17 INLINE RopeNode::CData::
20 _render_mode = RopeNode::RM_thread;
21 _uv_mode = RopeNode::UV_none;
24 _normal_mode = RopeNode::NM_none;
25 _tube_up = LVector3::up();
26 _matrix = LMatrix4::ident_mat();
28 _use_vertex_color =
false;
31 _use_vertex_thickness =
false;
38 INLINE RopeNode::CData::
39 CData(
const RopeNode::CData ©) :
41 _render_mode(copy._render_mode),
42 _uv_mode(copy._uv_mode),
43 _u_dominant(copy._u_dominant),
44 _uv_scale(copy._uv_scale),
45 _normal_mode(copy._normal_mode),
46 _tube_up(copy._tube_up),
47 _matrix(copy._matrix),
48 _has_matrix(copy._has_matrix),
49 _use_vertex_color(copy._use_vertex_color),
50 _num_subdiv(copy._num_subdiv),
51 _num_slices(copy._num_slices),
52 _use_vertex_thickness(copy._use_vertex_thickness),
53 _thickness(copy._thickness)
62 CDWriter cdata(_cycler);
63 cdata->_curve = curve;
71 CDReader cdata(_cycler);
81 CDWriter cdata(_cycler);
82 cdata->_render_mode = render_mode;
90 CDReader cdata(_cycler);
91 return cdata->_render_mode;
99 CDWriter cdata(_cycler);
100 cdata->_uv_mode = uv_mode;
108 CDReader cdata(_cycler);
109 return cdata->_uv_mode;
118 CDWriter cdata(_cycler);
119 cdata->_u_dominant = u_dominant;
128 CDReader cdata(_cycler);
129 return cdata->_u_dominant;
139 CDWriter cdata(_cycler);
140 cdata->_uv_scale = uv_scale;
148 CDReader cdata(_cycler);
149 return cdata->_uv_scale;
159 CDWriter cdata(_cycler);
160 cdata->_normal_mode = normal_mode;
169 CDReader cdata(_cycler);
170 return cdata->_normal_mode;
183 CDWriter cdata(_cycler);
184 cdata->_tube_up = tube_up;
193 CDReader cdata(_cycler);
194 return cdata->_tube_up;
206 CDWriter cdata(_cycler);
207 cdata->_use_vertex_color = flag;
215 CDReader cdata(_cycler);
216 return cdata->_use_vertex_color;
236 nassertv(num_subdiv >= 0);
237 CDWriter cdata(_cycler);
238 cdata->_num_subdiv = num_subdiv;
247 CDReader cdata(_cycler);
248 return cdata->_num_subdiv;
262 nassertv(num_slices >= 0);
263 CDWriter cdata(_cycler);
264 cdata->_num_slices = num_slices;
273 CDReader cdata(_cycler);
274 return cdata->_num_slices;
288 CDWriter cdata(_cycler);
289 cdata->_use_vertex_thickness = flag;
297 CDReader cdata(_cycler);
298 return cdata->_use_vertex_thickness;
319 nassertv(thickness >= 0);
320 CDWriter cdata(_cycler);
321 cdata->_thickness = thickness;
329 CDReader cdata(_cycler);
330 return cdata->_thickness;
340 CDWriter cdata(_cycler);
341 cdata->_matrix = matrix;
342 cdata->_has_matrix =
true;
350 CDWriter cdata(_cycler);
351 cdata->_matrix = LMatrix4::ident_mat();
352 cdata->_has_matrix =
false;
361 CDReader cdata(_cycler);
362 return cdata->_has_matrix;
372 CDReader cdata(_cycler);
373 return cdata->_matrix;
This class is an abstraction for evaluating NURBS curves.
set_num_slices
Specifies the number of radial subdivisions to make if RenderMode is RM_tube.
get_num_slices
Returns the number of radial subdivisions to make if RenderMode is RM_tube.
get_vertex_thickness_dimension
Returns the numeric extended dimension in which the thickness component should be found.
get_render_mode
Returns the method used to render the rope.
clear_matrix
Resets the node's matrix to identity.
set_use_vertex_thickness
Sets the "use vertex thickness" flag.
set_thickness
Specifies the thickness of the rope, in pixels or in spatial units, depending on the render mode.
get_thickness
Returns the thickness of the rope.
set_num_subdiv
Specifies the number of subdivisions per cubic segment (that is, per unique knot value) to draw in a ...
get_normal_mode
Returns the kind of normals to generate for the rope.
has_matrix
Returns true if the node has a matrix set, false otherwise.
get_uv_mode
Returns the algorithm to use to generate UV's for the rope.
set_uv_direction
Specify true to vary the U coordinate down the length of the rope, or false to vary the V coordinate.
set_normal_mode
Specifies the kind of normals to generate for the rope.
get_num_subdiv
Returns the number of subdivisions per cubic segment to draw.
get_uv_scale
Returns the scaling factor to apply to generated UV's for the rope.
set_uv_mode
Specifies the algorithm to use to generate UV's for the rope.
get_use_vertex_color
Returns the "use vertex color" flag.
get_uv_direction
Returns true if the rope runs down the U coordinate of the texture, or false if it runs down the V co...
get_tube_up
Returns the normal vector used to control the "top" of the curve, when RenderMode is RM_tube.
set_render_mode
Specifies the method used to render the rope.
get_vertex_color_dimension
Returns the numeric extended dimension in which the color components should be found.
get_use_vertex_thickness
Returns the "use vertex thickness" flag.
get_matrix
Returns the optional matrix which is used to transform each control vertex after it has been transfor...
set_matrix
Specifies an optional matrix which is used to transform each control vertex after it has been transfo...
get_curve
Returns the curve represented by the RopeNode.
set_tube_up
Specifies a normal vector, generally perpendicular to the main axis of the starting point of the curv...
set_uv_scale
Specifies an additional scaling factor to apply to generated UV's along the rope.
set_curve
Sets the particular curve represented by the RopeNode.
set_use_vertex_color
Sets the "use vertex color" flag.