NurbsCurveDrawer

Inheritance:

Methods of NurbsCurveDrawer:

Methods of ParametricCurveDrawer:

Methods of TypedObject:

getClassType
static TypeHandle NurbsCurveDrawer::get_class_type(void);

Undocumented function.

getShowCvs
bool NurbsCurveDrawer::get_show_cvs(void) const;

Description: Returns the current state of the show-CV's flag.

getShowHull
bool NurbsCurveDrawer::get_show_hull(void) const;

Description: Returns the current state of the show-hull flag.

getShowKnots
bool NurbsCurveDrawer::get_show_knots(void) const;

Description: Returns the current state of the show-knots flag.

hilight
bool NurbsCurveDrawer::hilight(int n);

Filename: nurbsCurveDrawer.I Created by: drose (05Mar01)
PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ .
To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net .
Description: Hilights a particular CV by showing it and its knot in a different color. Returns true if the CV exists and has been drawn, false otherwise.

recompute
virtual bool NurbsCurveDrawer::recompute(float t1, float t2, ParametricCurve *curve = ((void *)(0)));

Description:

setCvColor
void NurbsCurveDrawer::set_cv_color(float r, float g, float b);

Description: Specifies the color of the CV's.

setHullColor
void NurbsCurveDrawer::set_hull_color(float r, float g, float b);

Description: Specifies the color of the convex hull.

setKnotColor
void NurbsCurveDrawer::set_knot_color(float r, float g, float b);

Description: Specifies the color of the knots.

setShowCvs
void NurbsCurveDrawer::set_show_cvs(bool flag);

Description: Sets the flag that hides or shows the CV's.

setShowHull
void NurbsCurveDrawer::set_show_hull(bool flag);

Description: Sets the flag that hides or shows the convex hull.

setShowKnots
void NurbsCurveDrawer::set_show_knots(bool flag);

Description: Sets the flag that hides or shows the knots.

unhilight
bool NurbsCurveDrawer::unhilight(int n);

Description: Removes the hilight previously set on a CV.

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.