# ParametricCurveDrawer

from pandac.PandaModules import ParametricCurveDrawer

Class : ParametricCurveDrawer
Description : Draws a 3-d parametric curve in the scene by creating a series of line segments to approximate the curve.

## Inheritance:

ParametricCurveDrawer: TypedObject
TypedObject:

## Methods of ParametricCurveDrawer:

clearCurves
detachGeomNode
draw
getClassType
getCurves
getFrameAccurate
getGeomNode
getNumSegs
getNumTicks
getTickScale
hide
setColor
setCurve
setCurves
setFrameAccurate
setNumSegs
setNumTicks
setThickness
setTickColor
setTickScale

## Methods of TypedObject:

getBestParentFromSet
getClassType
getType
getTypeIndex
isExactType
isOfType

clearCurves void ParametricCurveDrawer::clear_curves(void); Description: Empties the list of curves the drawer will update. It will draw nothing.

detachGeomNode PointerTo< GeomNode > ParametricCurveDrawer::detach_geom_node(void); Description: Detaches the GeomNode from the drawer so that the drawing will remain after the death of the drawer. Returns the now-static GeomNode. A new, dynamic GeomNode is created for the drawer's future use; get_geom_node() will return this new GeomNode which will be empty until the next call to draw().

draw virtual bool ParametricCurveDrawer::draw(void); Description: Creates a series of line segments that approximates the curve. These line segments may be made visible by parenting the node returned by get_geom_node() into the scene graph.

getClassType static TypeHandle ParametricCurveDrawer::get_class_type(void); Undocumented function.

getCurves ParametricCurveCollection *ParametricCurveDrawer::get_curves(void); Description:

getFrameAccurate bool ParametricCurveDrawer::get_frame_accurate(void) const; Description: Returns whether the curve is drawn in frame-accurate mode.

getGeomNode GeomNode *ParametricCurveDrawer::get_geom_node(void); Description: Returns a pointer to the drawer's GeomNode. This is where the drawer will build the visible representation of the curve. This GeomNode must be inserted into the scene graph to make the curve visible. The GeomNode remains connected to the drawer, so that future updates to the drawer will reflect in the GeomNode, and the GeomNode will be emptied when the drawer destructs. Also see detach_geom_node().

getNumSegs float ParametricCurveDrawer::get_num_segs(void) const; Description: Returns the number of line segments used to approximate the curve for each parametric unit. This just affects the visual appearance of the curve as it is drawn. The total number of segments drawn for the curve will be get_max_t() * get_num_segs().

getNumTicks float ParametricCurveDrawer::get_num_ticks(void) const; Description: Returns the number of time tick marks per unit of time drawn.

getTickScale float ParametricCurveDrawer::get_tick_scale(void) const; Description: Returns the size of the time tick marks or geometry.

hide void ParametricCurveDrawer::hide(void); Description: Removes the lines that were created by a previous call to draw().

setColor void ParametricCurveDrawer::set_color(float r, float g, float b); Description: Specifies the color of the curve when it is drawn. The default is white.

setCurve void ParametricCurveDrawer::set_curve(ParametricCurve *curve); Description: Sets the drawer up to draw just the one curve.

setCurves void ParametricCurveDrawer::set_curves(ParametricCurveCollection *curves); Description: Sets the drawer up to draw the curves in the indicated collection. The drawer will actually draw just the first XYZ curve in the collection, but if one or more timewarps are present, this will affect the placement of tick marks.

setFrameAccurate void ParametricCurveDrawer::set_frame_accurate(bool frame_accurate); Description: Specifies whether the curve drawn is to be frame-accurate. If true, then changes made to the curve dynamically after it has been drawn will be reflected correctly in the render window. If false, dynamic updates may be drawn before the rest of the scene has updated.

setNumSegs void ParametricCurveDrawer::set_num_segs(float num_segs); Description: Specifies the number of line segments used to approximate the curve for each parametric unit. This just affects the visual appearance of the curve as it is drawn. The total number of segments drawn for the curve will be get_max_t() * get_num_segs().

setNumTicks void ParametricCurveDrawer::set_num_ticks(float num_ticks); Description: Specifies the number of time tick marks drawn for each unit of time. These tick marks are drawn at equal increments in time to give a visual approximation of speed. Specify 0 to disable drawing of tick marks.

setThickness void ParametricCurveDrawer::set_thickness(float thick); Description: Specifies the thickness of the line in pixels drawn to represent the curve. Note that pixel thickness of a line segment is not supported by DirectX.

setTickColor void ParametricCurveDrawer::set_tick_color(float r, float g, float b); Description: Specifies the color of the time tick marks drawn on the curve. The default is red.

setTickScale void ParametricCurveDrawer::set_tick_scale(float scale); Description: Sets the visible size of the time tick marks or geometry.

getBestParentFromSet int TypedObject::get_best_parent_from_Set(set< int > const &) const; Description: Returns true if the current object is the indicated type exactly.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.