Classes |
| class | CData |
| class | CurveVertex |
Public Types |
| enum | NormalMode { NM_none,
NM_vertex
} |
| enum | RenderMode { RM_thread,
RM_tape,
RM_billboard,
RM_tube
} |
| enum | UVMode { UV_none,
UV_parametric,
UV_distance,
UV_distance2
} |
Public Member Functions |
|
| RopeNode (const string &name) |
| void | clear_matrix () |
| | Resets the node's matrix to identity.
|
| virtual bool | cull_callback (CullTraverser *trav, CullTraverserData &data) |
| | This function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
|
|
virtual TypeHandle | force_init_type () |
| NurbsCurveEvaluator * | get_curve () const |
| | Returns the curve represented by the RopeNode.
|
| const LMatrix4 & | get_matrix () const |
| | Returns the optional matrix which is used to transform each control vertex after it has been transformed into the RopeNode's coordinate space, but before the polygon vertices are generated.
|
| NormalMode | get_normal_mode () const |
| | Returns the kind of normals to generate for the rope.
|
| int | get_num_slices () const |
| | Returns the number of radial subdivisions to make if RenderMode is RM_tube.
|
| int | get_num_subdiv () const |
| | Returns the number of subdivisions per cubic segment to draw.
|
| RenderMode | get_render_mode () const |
| | Returns the method used to render the rope.
|
| PN_stdfloat | get_thickness () const |
| | Returns the thickness of the rope.
|
| const LVector3 & | get_tube_up () const |
| | Returns the normal vector used to control the "top" of the curve, when RenderMode is RM_tube.
|
|
virtual TypeHandle | get_type () const |
| bool | get_use_vertex_color () const |
| | Returns the "use vertex color" flag.
|
| bool | get_use_vertex_thickness () const |
| | Returns the "use vertex thickness" flag.
|
| bool | get_uv_direction () const |
| | Returns true if the rope runs down the U coordinate of the texture, or false if it runs down the V coordinate.
|
| UVMode | get_uv_mode () const |
| | Returns the algorithm to use to generate UV's for the rope.
|
| PN_stdfloat | get_uv_scale () const |
| | Returns the scaling factor to apply to generated UV's for the rope.
|
| bool | has_matrix () const |
| | Returns true if the node has a matrix set, false otherwise.
|
| virtual bool | is_renderable () const |
| | Returns true if there is some value to visiting this particular node during the cull traversal for any camera, false otherwise.
|
| virtual PandaNode * | make_copy () const |
| | Returns a newly-allocated Node that is a shallow copy of this one.
|
| virtual void | output (ostream &out) const |
| | Outputs the Namable.
|
| void | reset_bound (const NodePath &rel_to) |
| | Recomputes the bounding volume.
|
| virtual bool | safe_to_transform () const |
| | Returns true if it is generally safe to transform this particular kind of Node by calling the xform() method, false otherwise.
|
| void | set_curve (NurbsCurveEvaluator *curve) |
| | Sets the particular curve represented by the RopeNode.
|
| void | set_matrix (const LMatrix4 &matrix) |
| | Specifies an optional matrix which is used to transform each control vertex after it has been transformed into the RopeNode's coordinate space, but before the polygon vertices are generated.
|
| void | set_normal_mode (NormalMode normal_mode) |
| | Specifies the kind of normals to generate for the rope.
|
| void | set_num_slices (int num_slices) |
| | Specifies the number of radial subdivisions to make if RenderMode is RM_tube.
|
| void | set_num_subdiv (int num_subdiv) |
| | Specifies the number of subdivisions per cubic segment (that is, per unique knot value) to draw in a fixed uniform tesselation of the curve.
|
| void | set_render_mode (RenderMode render_mode) |
| | Specifies the method used to render the rope.
|
| void | set_thickness (PN_stdfloat thickness) |
| | Specifies the thickness of the rope, in pixels or in spatial units, depending on the render mode.
|
| void | set_tube_up (const LVector3 &tube_up) |
| | Specifies a normal vector, generally perpendicular to the main axis of the starting point of the curve, that controls the "top" of the curve, when RenderMode is RM_tube.
|
| void | set_use_vertex_color (bool flag) |
| | Sets the "use vertex color" flag.
|
| void | set_use_vertex_thickness (bool flag) |
| | Sets the "use vertex thickness" flag.
|
| void | set_uv_direction (bool u_dominant) |
| | Specify true to vary the U coordinate down the length of the rope, or false to vary the V coordinate.
|
| void | set_uv_mode (UVMode uv_mode) |
| | Specifies the algorithm to use to generate UV's for the rope.
|
| void | set_uv_scale (PN_stdfloat scale) |
| | Specifies an additional scaling factor to apply to generated UV's along the rope.
|
|
virtual void | write (ostream &out, int indent_level=0) const |
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static int | get_vertex_color_dimension () |
| | Returns the numeric extended dimension in which the color components should be found.
|
| static int | get_vertex_thickness_dimension () |
| | Returns the numeric extended dimension in which the thickness component should be found.
|
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type RopeNode.
|
Protected Member Functions |
|
| RopeNode (const RopeNode ©) |
| virtual void | compute_internal_bounds (CPT(BoundingVolume)&internal_bounds, int &internal_vertices, int pipeline_stage, Thread *current_thread) const |
| | Called when needed to recompute the node's _internal_bound object.
|
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new RopeNode.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type RopeNode is encountered in the Bam file.
|
This class draws a visible representation of the NURBS curve stored in its NurbsCurveEvaluator.
It automatically recomputes the curve every frame.
This is not related to NurbsCurve, CubicCurveseg or any of the ParametricCurve-derived objects in this module. It is a completely parallel implementation of NURBS curves, and will probably eventually replace the whole ParametricCurve class hierarchy.
Definition at line 38 of file ropeNode.h.