RopeNode¶
-
class RopeNode¶
Bases:
AcronNodeThis 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,CubicCurvesegor any of the ParametricCurve-derived objects in this module. It is a completely parallel implementation of NURBS curves, and will probably eventually replace the wholeParametricCurveclass hierarchy.Inheritance diagram
digraph inheritance8519113288 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AcronNode" [URL="acron.core.AcronNode.html#acron.core.AcronNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "AcronNode" [arrowsize=0.75,style=""]; "Namable" -> "AcronNode" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RopeNode" [URL="acron.core.RopeNode.html#acron.core.RopeNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AcronNode" -> "RopeNode" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }-
enum NormalMode¶
-
enumerator NM_none = 0¶
Don’t generate normals.
-
enumerator NM_vertex = 1¶
Generate vertex (smooth-shaded) normals.
-
enumerator NM_none = 0¶
-
enum RenderMode¶
-
enumerator RM_thread = 0¶
Render the rope as a one-pixel thread using a linestrip.
-
enumerator RM_tape = 1¶
Render the rope as a triangle strip oriented to be perpendicular to the tube_up vector.
-
enumerator RM_billboard = 2¶
Render the rope as a triangle strip oriented to be perpendicular to the view vector.
-
enumerator RM_tube = 3¶
Render the rope as a hollow tube extruded along its length.
-
enumerator RM_thread = 0¶
-
enum UVMode¶
-
enumerator UV_none = 0¶
Don’t generate UV’s along the curve.
-
enumerator UV_parametric = 1¶
Generate UV’s based on the parametric coordinates along the curve.
-
enumerator UV_distance = 2¶
Generate UV’s in proportion to spatial distance along the curve, by using the distance function to compute the length of each segment.
-
enumerator UV_distance2 = 3¶
As above, but don’t bother to take the square root of each segment. The distance is then in proportion to the sum-of-squares of the segments along the rope. If the segments are similar in length, this approximates the proportion of UV_distance while avoiding hundreds of square root operations.
-
enumerator UV_none = 0¶
- RopeNode.__init__()¶
- RopeNode.clear_matrix()¶
Resets the node’s matrix to identity. See
set_matrix().
- static RopeNode.get_class_type()¶
- RopeNode.get_matrix()¶
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.
- RopeNode.get_normal_mode()¶
Returns the kind of normals to generate for the rope. This is only applicable when the
RenderModeis set to RM_tube.
- RopeNode.get_num_slices()¶
Returns the number of radial subdivisions to make if
RenderModeis RM_tube. It is ignored in the other render modes. Seeset_num_slices().
- RopeNode.get_num_subdiv()¶
Returns the number of subdivisions per cubic segment to draw. See
set_num_subdiv().
- RopeNode.get_render_mode()¶
Returns the method used to render the rope. See
set_render_mode().
- RopeNode.get_thickness()¶
Returns the thickness of the rope. See
set_thickness().
- RopeNode.get_tube_up()¶
Returns the normal vector used to control the “top” of the curve, when
RenderModeis RM_tube. Seeset_tube_up().
- RopeNode.get_use_vertex_color()¶
Returns the “use vertex color” flag. See
set_use_vertex_color().
- RopeNode.get_use_vertex_thickness()¶
Returns the “use vertex thickness” flag. See
set_use_vertex_thickness().
- RopeNode.get_uv_direction()¶
Returns true if the rope runs down the U coordinate of the texture, or false if it runs down the V coordinate.
- RopeNode.get_uv_mode()¶
Returns the algorithm to use to generate UV’s for the rope.
- RopeNode.get_uv_scale()¶
Returns the scaling factor to apply to generated UV’s for the rope.
- static RopeNode.get_vertex_color_dimension()¶
Returns the numeric extended dimension in which the color components should be found. See
NurbsCurveEvaluator::set_extended_vertex().The color components will be expected at (n, n + 1, n + 2, n + 3).
- static RopeNode.get_vertex_thickness_dimension()¶
Returns the numeric extended dimension in which the thickness component should be found. See
NurbsCurveEvaluator::set_extended_vertex().
- RopeNode.has_matrix()¶
Returns true if the node has a matrix set, false otherwise. See
set_matrix().
- RopeNode.reset_bound()¶
Recomputes the bounding volume. This is normally called automatically, but it must occasionally be called explicitly when the curve has changed properties outside of this node’s knowledge.
- RopeNode.set_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.
- RopeNode.set_normal_mode()¶
Specifies the kind of normals to generate for the rope. This is only applicable when the
RenderModeis set to RM_tube; in the other render modes, normals are never generated.
- RopeNode.set_num_slices()¶
Specifies the number of radial subdivisions to make if
RenderModeis RM_tube. It is ignored in the other render modes.Increasing this number increases the roundness of a cross-section of the tube. The minimum value for a dimensional tube is 3; setting it to 2 will get you a thin piece of tape (which is similar to RM_billboard, except it won’t rotate to face the camera).
- RopeNode.set_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.
- RopeNode.set_render_mode()¶
Specifies the method used to render the rope. The simplest is RM_thread, which just draws a one-pixel line segment.
- RopeNode.set_thickness()¶
Specifies the thickness of the rope, in pixels or in spatial units, depending on the render mode. See
set_render_mode().The thickness may also be specified on a per-vertex basis. See
set_use_vertex_thickness().
- RopeNode.set_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
RenderModeis RM_tube. This is used to orient the vertices that make up the tube. If this vector is too nearly parallel with the starting direction of the curve, there may be a tendency for the whole tube to gimble-lock around its primary axis.
- RopeNode.set_use_vertex_color()¶
Sets the “use vertex color” flag. When this is true, the R, G, B, A vertex color is assumed to be stored as the dimensions n + 0, n + 1, n + 2, n + 3, respectively, of the extended vertex values, where n is the value returned by
get_vertex_color_dimension(). UseNurbsCurveEvaluator::set_extended_vertex()to set these values.
- RopeNode.set_use_vertex_thickness()¶
Sets the “use vertex thickness” flag. When this is true, the vertex thickness is assumed to be stored as the dimension
get_vertex_thickness_dimension(), of the extended vertex values. UseNurbsCurveEvaluator::set_extended_vertex()to set these values.In this mode, the overall thickness is also applied as a scale to the vertex thickness. Not all render modes support vertex thickness.
- RopeNode.set_uv_direction()¶
Specify true to vary the U coordinate down the length of the rope, or false to vary the V coordinate.
- RopeNode.set_uv_mode()¶
Specifies the algorithm to use to generate UV’s for the rope.
- RopeNode.set_uv_scale()¶
Specifies an additional scaling factor to apply to generated UV’s along the rope. This scale factor is applied in whichever direction is along the rope, as specified by
set_uv_direction().
-
enum NormalMode¶