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;
88 INLINE RopeNode::RenderMode RopeNode::
89 get_render_mode()
const {
90 CDReader cdata(_cycler);
91 return cdata->_render_mode;
99 CDWriter cdata(_cycler);
100 cdata->_uv_mode = uv_mode;
106 INLINE RopeNode::UVMode RopeNode::
107 get_uv_mode()
const {
108 CDReader cdata(_cycler);
109 return cdata->_uv_mode;
118 CDWriter cdata(_cycler);
119 cdata->_u_dominant = u_dominant;
126 INLINE
bool RopeNode::
127 get_uv_direction()
const {
128 CDReader cdata(_cycler);
129 return cdata->_u_dominant;
139 CDWriter cdata(_cycler);
140 cdata->_uv_scale = uv_scale;
146 INLINE PN_stdfloat RopeNode::
147 get_uv_scale()
const {
148 CDReader cdata(_cycler);
149 return cdata->_uv_scale;
159 CDWriter cdata(_cycler);
160 cdata->_normal_mode = normal_mode;
167 INLINE RopeNode::NormalMode RopeNode::
168 get_normal_mode()
const {
169 CDReader cdata(_cycler);
170 return cdata->_normal_mode;
183 CDWriter cdata(_cycler);
184 cdata->_tube_up = tube_up;
191 INLINE
const LVector3 &RopeNode::
192 get_tube_up()
const {
193 CDReader cdata(_cycler);
194 return cdata->_tube_up;
206 CDWriter cdata(_cycler);
207 cdata->_use_vertex_color = flag;
213 INLINE
bool RopeNode::
214 get_use_vertex_color()
const {
215 CDReader cdata(_cycler);
216 return cdata->_use_vertex_color;
225 INLINE
int RopeNode::
226 get_vertex_color_dimension() {
236 nassertv(num_subdiv >= 0);
237 CDWriter cdata(_cycler);
238 cdata->_num_subdiv = num_subdiv;
245 INLINE
int RopeNode::
246 get_num_subdiv()
const {
247 CDReader cdata(_cycler);
248 return cdata->_num_subdiv;
262 nassertv(num_slices >= 0);
263 CDWriter cdata(_cycler);
264 cdata->_num_slices = num_slices;
271 INLINE
int RopeNode::
272 get_num_slices()
const {
273 CDReader cdata(_cycler);
274 return cdata->_num_slices;
288 CDWriter cdata(_cycler);
289 cdata->_use_vertex_thickness = flag;
295 INLINE
bool RopeNode::
296 get_use_vertex_thickness()
const {
297 CDReader cdata(_cycler);
298 return cdata->_use_vertex_thickness;
305 INLINE
int RopeNode::
306 get_vertex_thickness_dimension() {
319 nassertv(thickness >= 0);
320 CDWriter cdata(_cycler);
321 cdata->_thickness = thickness;
327 INLINE PN_stdfloat RopeNode::
328 get_thickness()
const {
329 CDReader cdata(_cycler);
330 return cdata->_thickness;
340 CDWriter cdata(_cycler);
341 cdata->_matrix = matrix;
342 cdata->_has_matrix =
true;
348 INLINE
void RopeNode::
350 CDWriter cdata(_cycler);
351 cdata->_matrix = LMatrix4::ident_mat();
352 cdata->_has_matrix =
false;
359 INLINE
bool RopeNode::
361 CDReader cdata(_cycler);
362 return cdata->_has_matrix;
370 INLINE
const LMatrix4 &RopeNode::
372 CDReader cdata(_cycler);
373 return cdata->_matrix;
This class is an abstraction for evaluating NURBS curves.
set_use_vertex_thickness
Sets the "use vertex thickness" flag.
set_use_vertex_color
Sets the "use vertex color" flag.
set_num_subdiv
Specifies the number of subdivisions per cubic segment (that is, per unique knot value) to draw in a ...
set_matrix
Specifies an optional matrix which is used to transform each control vertex after it has been transfo...
set_uv_mode
Specifies the algorithm to use to generate UV's for the rope.
set_render_mode
Specifies the method used to render the rope.
set_normal_mode
Specifies the kind of normals to generate 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_tube_up
Specifies a normal vector, generally perpendicular to the main axis of the starting point of the curv...
set_thickness
Specifies the thickness of the rope, in pixels or in spatial units, depending on the render mode.
set_curve
Sets the particular curve represented by the RopeNode.
set_uv_scale
Specifies an additional scaling factor to apply to generated UV's along the rope.
set_num_slices
Specifies the number of radial subdivisions to make if RenderMode is RM_tube.