41 _head = top_node->get_generic_component(
false, pipeline_stage, current_thread);
62 _head = node->get_generic_component(
false, pipeline_stage, current_thread);
81 result._head = node->get_generic_component(
true, pipeline_stage,
95 _backup_key(copy._backup_key),
96 _error_type(copy._error_type)
105 INLINE
void NodePath::
108 _backup_key = copy._backup_key;
109 _error_type = copy._error_type;
112 #ifdef USE_MOVE_SEMANTICS 120 _head(move(from._head)),
121 _backup_key(from._backup_key),
122 _error_type(from._error_type)
131 INLINE
void NodePath::
132 operator = (
NodePath &&from) NOEXCEPT {
133 _head = move(from._head);
134 _backup_key = from._backup_key;
135 _error_type = from._error_type;
137 #endif // USE_MOVE_SEMANTICS 161 result._error_type = ET_not_found;
174 result._error_type = ET_removed;
187 result._error_type = ET_fail;
216 _max_search_depth = max_search_depth;
227 return _max_search_depth;
249 return (_head != (
NodePathComponent *)NULL && _head->is_top_node(pipeline_stage, current_thread));
286 return _head->get_node();
311 return _head->get_key();
355 int a_count, b_count;
356 return (find_common_ancestor(*
this, other, a_count, b_count, current_thread) != (
NodePathComponent *)NULL);
368 int a_count, b_count;
369 if (find_common_ancestor(*
this, other, a_count, b_count, current_thread) == (
NodePathComponent *)NULL) {
376 return (a_count == 0);
389 int a_count, b_count;
390 NodePathComponent *common = find_common_ancestor(*
this, other, a_count, b_count, current_thread);
396 result._head = common;
408 return _head->get_node()->get_num_children(current_thread);
422 child._head = PandaNode::get_component(_head, _head->get_node()->get_child(n, current_thread),
423 pipeline_stage, current_thread);
437 return _head->get_node()->count_num_descendants();
468 parent._head = _head->get_next(pipeline_stage, current_thread);
502 ls(ostream &out,
int indent_level)
const {
506 node()->ls(out, indent_level);
533 node()->write(out, indent_level);
534 return indent_level + 2;
554 get_net_state(
Thread *current_thread)
const {
555 nassertr(_error_type == ET_ok, RenderState::make_empty());
556 return r_get_net_state(_head, current_thread);
567 INLINE
void NodePath::
585 return node()->get_attrib(type);
597 nassertr_always(!
is_empty(),
false);
598 return node()->has_attrib(type);
612 node()->clear_attrib(type);
637 return node()->get_effect(type);
649 nassertr_always(!
is_empty(),
false);
650 return node()->has_effect(type);
687 nassertr_always(!
is_empty(), RenderEffects::make_empty());
688 return node()->get_effects();
699 node()->clear_effects();
709 set_transform(TransformState::make_identity(), current_thread);
732 set_transform(other, TransformState::make_identity(), current_thread);
740 INLINE CPT(TransformState) NodePath::
741 get_net_transform(
Thread *current_thread)
const {
742 nassertr(_error_type == ET_ok, TransformState::make_identity());
743 return r_get_net_transform(_head, current_thread);
754 INLINE
void NodePath::
755 set_prev_transform(
const TransformState *transform,
Thread *current_thread) {
766 INLINE CPT(TransformState) NodePath::
767 get_net_prev_transform(
Thread *current_thread)
const {
768 nassertr(_error_type == ET_ok, TransformState::make_identity());
769 return r_get_net_prev_transform(_head, current_thread);
782 INLINE
void NodePath::
783 set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
800 INLINE PN_stdfloat NodePath::
805 INLINE PN_stdfloat NodePath::
810 INLINE PN_stdfloat NodePath::
822 set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) {
826 INLINE PN_stdfloat NodePath::
831 INLINE PN_stdfloat NodePath::
836 INLINE PN_stdfloat NodePath::
853 set_scale(PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) {
857 INLINE PN_stdfloat NodePath::
862 INLINE PN_stdfloat NodePath::
867 INLINE PN_stdfloat NodePath::
879 set_shear(PN_stdfloat shxy, PN_stdfloat shxz, PN_stdfloat shyz) {
883 INLINE PN_stdfloat NodePath::
888 INLINE PN_stdfloat NodePath::
893 INLINE PN_stdfloat NodePath::
905 set_pos_hpr(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) {
916 set_hpr_scale(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) {
927 set_pos_hpr_scale(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r,
928 PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) {
942 node()->clear_transform();
953 nassertr_always(!
is_empty(),
false);
954 return !
node()->get_transform()->is_identity();
968 return node()->get_transform()->get_mat();
981 look_at(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
993 heads_up(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
1003 INLINE
void NodePath::
1004 set_pos(
const NodePath &other, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
1005 set_pos(other,
LPoint3(x, y, z));
1021 INLINE PN_stdfloat NodePath::
1022 get_x(
const NodePath &other)
const {
1026 INLINE PN_stdfloat NodePath::
1027 get_y(
const NodePath &other)
const {
1031 INLINE PN_stdfloat NodePath::
1032 get_z(
const NodePath &other)
const {
1047 INLINE PN_stdfloat NodePath::
1048 get_h(
const NodePath &other)
const {
1052 INLINE PN_stdfloat NodePath::
1053 get_p(
const NodePath &other)
const {
1057 INLINE PN_stdfloat NodePath::
1058 get_r(
const NodePath &other)
const {
1090 INLINE PN_stdfloat NodePath::
1095 INLINE PN_stdfloat NodePath::
1096 get_sy(
const NodePath &other)
const {
1100 INLINE PN_stdfloat NodePath::
1101 get_sz(
const NodePath &other)
const {
1122 INLINE PN_stdfloat NodePath::
1127 INLINE PN_stdfloat NodePath::
1128 get_shxz(
const NodePath &other)
const {
1132 INLINE PN_stdfloat NodePath::
1133 get_shyz(
const NodePath &other)
const {
1145 PN_stdfloat x, PN_stdfloat y, PN_stdfloat z,
1146 PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) {
1160 PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) {
1173 PN_stdfloat x, PN_stdfloat y, PN_stdfloat z,
1174 PN_stdfloat h, PN_stdfloat p, PN_stdfloat r,
1175 PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) {
1223 set_color_scale(PN_stdfloat sr, PN_stdfloat sg, PN_stdfloat sb, PN_stdfloat sa,
int priority) {
1334 INLINE
void NodePath::
1336 set_shader_input(
new ShaderInput(
id, v, priority));
1344 INLINE
void NodePath::
1346 set_shader_input(
new ShaderInput(
id, v, priority));
1354 INLINE
void NodePath::
1356 set_shader_input(
new ShaderInput(
id, v, priority));
1364 INLINE
void NodePath::
1365 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase4 &v,
int priority) {
1366 set_shader_input(
new ShaderInput(
id, v, priority));
1374 INLINE
void NodePath::
1375 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase3 &v,
int priority) {
1376 set_shader_input(
new ShaderInput(
id, v, priority));
1385 INLINE
void NodePath::
1386 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase2 &v,
int priority) {
1387 set_shader_input(
new ShaderInput(
id, v, priority));
1395 INLINE
void NodePath::
1397 set_shader_input(
new ShaderInput(
id, v, priority));
1405 INLINE
void NodePath::
1407 set_shader_input(
new ShaderInput(
id, v, priority));
1415 INLINE
void NodePath::
1417 set_shader_input(
new ShaderInput(
id, v, priority));
1425 INLINE
void NodePath::
1426 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase4i &v,
int priority) {
1427 set_shader_input(
new ShaderInput(
id, v, priority));
1435 INLINE
void NodePath::
1436 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase3i &v,
int priority) {
1437 set_shader_input(
new ShaderInput(
id, v, priority));
1446 INLINE
void NodePath::
1447 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase2i &v,
int priority) {
1448 set_shader_input(
new ShaderInput(
id, v, priority));
1456 INLINE
void NodePath::
1458 set_shader_input(
new ShaderInput(
id, v, priority));
1466 INLINE
void NodePath::
1468 set_shader_input(
new ShaderInput(
id, v, priority));
1476 INLINE
void NodePath::
1478 set_shader_input(
new ShaderInput(
id, v, priority));
1486 INLINE
void NodePath::
1487 set_shader_input(
CPT_InternalName id,
const PTA_LMatrix4 &v,
int priority) {
1488 set_shader_input(
new ShaderInput(
id, v, priority));
1496 INLINE
void NodePath::
1497 set_shader_input(
CPT_InternalName id,
const PTA_LMatrix3 &v,
int priority) {
1498 set_shader_input(
new ShaderInput(
id, v, priority));
1506 INLINE
void NodePath::
1508 set_shader_input(
new ShaderInput(
id, v, priority));
1516 INLINE
void NodePath::
1518 set_shader_input(
new ShaderInput(
id, v, priority));
1526 INLINE
void NodePath::
1528 set_shader_input(
new ShaderInput(
id, tex, priority));
1536 INLINE
void NodePath::
1538 set_shader_input(
new ShaderInput(
id, tex, sampler, priority));
1546 INLINE
void NodePath::
1548 set_shader_input(
new ShaderInput(
id, tex, read, write, z, n, priority));
1556 INLINE
void NodePath::
1558 set_shader_input(
new ShaderInput(
id, np, priority));
1566 INLINE
void NodePath::
1567 set_shader_input(
CPT_InternalName id,
int n1,
int n2,
int n3,
int n4,
int priority) {
1576 INLINE
void NodePath::
1577 set_shader_input(
CPT_InternalName id, PN_stdfloat n1, PN_stdfloat n2, PN_stdfloat n3, PN_stdfloat n4,
int priority) {
1608 get_tex_transform(stage)->set_pos2d(uv));
1625 get_tex_transform(stage)->set_rotate2d(r));
1641 get_tex_transform(stage)->
set_scale(scale));
1671 get_tex_transform(stage)->set_scale2d(scale));
1686 return get_tex_transform(stage)->get_pos2d();
1700 nassertr_always(!
is_empty(), 0.0f);
1701 return get_tex_transform(stage)->get_rotate2d();
1716 return get_tex_transform(stage)->get_scale2d();
1744 get_tex_transform(stage)->set_pos(uvw));
1774 get_tex_transform(stage)->
set_hpr(hpr));
1802 get_tex_transform(stage)->
set_scale(scale));
1816 return get_tex_transform(stage)->get_pos();
1830 return get_tex_transform(stage)->get_hpr();
1844 return get_tex_transform(stage)->get_scale();
1874 get_tex_transform(other, stage)->set_pos2d(uv));
1891 get_tex_transform(other, stage)->set_rotate2d(r));
1907 get_tex_transform(stage)->
set_scale(scale));
1937 get_tex_transform(stage)->set_scale2d(scale));
1952 return get_tex_transform(other, stage)->get_pos2d();
1966 nassertr_always(!
is_empty(), 0.0f);
1967 return get_tex_transform(other, stage)->get_rotate2d();
1982 return get_tex_transform(other, stage)->get_scale2d();
2010 get_tex_transform(stage)->set_pos(uvw));
2040 get_tex_transform(stage)->
set_hpr(hpr));
2068 get_tex_transform(stage)->
set_scale(scale));
2082 return get_tex_transform(stage)->get_pos();
2096 return get_tex_transform(stage)->get_hpr();
2110 return get_tex_transform(stage)->get_scale();
2188 r_adjust_all_priorities(
node(), adjustment);
2220 camera_mask &= ~
PandaNode::get_overall_bit();
2256 camera_mask &= ~
PandaNode::get_overall_bit();
2289 camera_mask &= ~
PandaNode::get_overall_bit();
2353 node_type = PandaNode::get_class_type();
2356 r_set_collide_mask(
node(), ~bits_to_change, new_mask & bits_to_change,
2369 return _head == other._head;
2379 return _head != other._head;
2393 return _head < other._head;
2416 if (_head != other._head) {
2417 return _head < other._head ? -1 : 1;
2436 return r_clear_model_nodes(
node());
2473 return node()->get_tag(key);
2507 return node()->has_tag(key);
2571 node()->set_name(name);
2581 nassertr_always(!
is_empty(),
string());
2582 return node()->get_name();
2606 INLINE ostream &operator << (ostream &out,
const NodePath &node_path) {
void set_tag(const string &key, const string &value, Thread *current_thread=Thread::get_current_thread())
Associates a user-defined value with a user-defined key which is stored on the node.
int get_num_children(Thread *current_thread=Thread::get_current_thread()) const
Returns the number of children of the referenced node.
static const LMatrix4f & ident_mat()
Returns an identity matrix.
A basic node of the scene graph or data graph.
void adjust_all_priorities(int adjustment)
Adds the indicated adjustment amount (which may be negative) to the priority for all transitions on t...
static size_t add_hash(size_t start, const void *key)
Adds the indicated key into a running hash.
bool has_vertex_column(const InternalName *name) const
Returns true if there are at least some vertices at this node and below that contain a reference to t...
This is the base class for all three-component vectors and points.
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
void set_hpr_scale(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz)
Sets the rotation and scale components of the transform, leaving translation untouched.
void show_through()
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits...
static void set_max_search_depth(int max_search_depth)
Certain operations, such as find() or find_all_matches(), require a traversal of the scene graph to s...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
void set_pos_hpr(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r)
Sets the translation and rotation component of the transform, leaving scale untouched.
static TypeHandle none()
Returns a special zero-valued TypeHandle that is used to indicate no type.
NodePath()
This constructs an empty NodePath with no nodes.
void set_collide_mask(CollideMask new_mask, CollideMask bits_to_change=CollideMask::all_on(), TypeHandle node_type=TypeHandle::none())
Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level a...
int get_pipeline_stage() const
Returns the Pipeline stage number associated with this thread.
bool is_empty() const
Returns true if the NodePath contains no nodes.
PN_stdfloat get_sb() const
Gets the blue scale component of the transform.
void set_effects(const RenderEffects *effects, Thread *current_thread=Thread::get_current_thread())
Sets the complete RenderEffects that will be applied this node.
const LVecBase4 & get_color_scale() const
Returns the complete color scale vector that has been applied to this node via a previous call to set...
NodePath get_stashed_ancestor(Thread *current_thread=Thread::get_current_thread()) const
Returns the NodePath at or above the referenced node that is stashed, or an empty NodePath if no ance...
void get_tag_keys(vector_string &keys) const
Fills the given vector up with the list of tags on this PandaNode.
void clear_tag(const string &key, Thread *current_thread=Thread::get_current_thread())
Removes the value defined for this key on this particular node.
int compare_to(const NodePath &other) const
Returns a number less than zero if this NodePath sorts before the other one, greater than zero if it ...
bool has_tag(const string &key) const
Returns true if a value has been defined on this node for the particular key (even if that value is t...
void set_scale(PN_stdfloat scale)
Sets the scale component of the transform, leaving translation and rotation untouched.
bool is_ancestor_of(const NodePath &other, Thread *current_thread=Thread::get_current_thread()) const
Returns true if the node represented by this NodePath is a parent or other ancestor of the other Node...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
bool has_net_tag(const string &key) const
Returns true if the indicated tag value has been defined on this node or on any ancestor node...
NodePath get_hidden_ancestor(DrawMask camera_mask=PandaNode::get_overall_bit(), Thread *current_thread=Thread::get_current_thread()) const
Returns the NodePath at or above the referenced node that is hidden to the indicated camera(s)...
void clear_tex_gen()
Removes the texture coordinate generation mode from all texture stages on this node.
PN_stdfloat get_distance(const NodePath &other) const
Returns the straight-line distance between this referenced node's coordinate frame's origin...
PN_stdfloat get_tex_rotate(TextureStage *stage) const
Returns the rotation set for the UV's for the given stage on the current node.
This is the base class for all two-component vectors and points.
const RenderEffects * get_effects() const
Returns the complete RenderEffects that will be applied to this node.
NodePath get_common_ancestor(const NodePath &other, Thread *current_thread=Thread::get_current_thread()) const
Returns the lowest NodePath that both of these two NodePaths have in common: the first ancestor that ...
PandaNode * get_top_node(Thread *current_thread=Thread::get_current_thread()) const
Returns the top node of the path, or NULL if the path is empty.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
void compose_color_scale(const LVecBase4 &scale, int priority=0)
multiplies the color scale component of the transform, with previous color scale leaving translation ...
void adjust_draw_mask(DrawMask show_mask, DrawMask hide_mask, DrawMask clear_mask)
Adjusts the hide/show bits of this particular node.
int clear_model_nodes()
Recursively walks through the scene graph at this level and below, looking for ModelNodes, and calls model_node->set_preserve_transform(PT_drop_node) on each one.
static BitMask< PN_uint32, nbits > all_off()
Returns a BitMask whose bits are all off.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This is the base class for a number of special render effects that may be set on scene graph nodes to...
static const LVecBase2f & zero()
Returns a zero-length vector.
PN_stdfloat get_sg() const
Gets the green scale component of the transform.
static const LVecBase3f & zero()
Returns a zero-length vector.
void show()
Undoes the effect of a previous hide() on this node: makes the referenced node (and the entire subgra...
void get_tag_keys(vector_string &keys) const
Fills the given vector up with the list of tags on this PandaNode.
This is the base class for all three-component vectors and points.
void clear_transform(Thread *current_thread=Thread::get_current_thread())
Sets the transform object on this node to identity.
void set_tex_scale(TextureStage *stage, PN_stdfloat scale)
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage...
bool has_mat() const
Returns true if a non-identity transform matrix has been applied to the referenced node...
NodePath find_net_tag(const string &key) const
Returns the lowest ancestor of this node that contains a tag definition with the indicated key...
void reverse_ls() const
Lists the hierarchy at and above the referenced node.
void clear_effects()
Resets this node to have no render effects.
void set_transform(const TransformState *transform, Thread *current_thread=Thread::get_current_thread())
Changes the complete transform object on this node.
void set_effects(const RenderEffects *effects)
Sets the complete RenderEffects that will be applied this node.
void set_tag(const string &key, const string &value)
Associates a user-defined value with a user-defined key which is stored on the node.
bool is_stashed() const
Returns true if the referenced node is stashed either directly, or because some ancestor is stashed...
static NodePath any_path(PandaNode *node, Thread *current_thread=Thread::get_current_thread())
Returns a new NodePath that represents any arbitrary path from the root to the indicated node...
const RenderAttrib * get_attrib(TypeHandle type) const
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is no...
void output(ostream &out) const
Writes a sensible description of the NodePath to the indicated output stream.
int count_num_descendants() const
Returns the number of nodes at and below this level.
bool operator==(const NodePath &other) const
Returns true if the two paths are equivalent; that is, if they contain the same list of nodes in the ...
string get_tag(const string &key) const
Retrieves the user-defined value that was previously set on this node for the particular key...
int get_key() const
Returns an integer that is guaranteed to be the same for all NodePaths that represent the same node i...
PN_stdfloat get_sr() const
Gets the red scale component of the transform.
CollideMask get_collide_mask() const
Returns the union of all of the into_collide_masks for nodes at this level and below.
void set_sr(PN_stdfloat sr)
Sets the red scale component of the transform.
LVecBase3 get_tex_scale_3d(TextureStage *stage) const
Returns the scale set for the UVW's for the given stage on the current node.
bool operator<(const NodePath &other) const
Returns true if this NodePath sorts before the other one, false otherwise.
bool verify_complete(Thread *current_thread=Thread::get_current_thread()) const
Returns true if all of the nodes described in the NodePath are connected, or false otherwise...
void heads_up(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicat...
void list_tags() const
Lists the tags to the nout stream, one per line.
static NodePath fail()
Creates a NodePath with the ET_fail error type set.
LVecBase2 get_tex_offset(TextureStage *stage) const
Returns the offset set for the UV's for the given stage on the current node.
static int get_max_search_depth()
Returns the current setting of the search depth limit.
ErrorType get_error_type() const
If is_empty() is true, this returns a code that represents the reason why the NodePath is empty...
bool has_effect(TypeHandle type) const
Returns true if there is a render effect of the indicated type defined on this node, or false if there is not.
NodePath attach_new_node(PandaNode *node, int sort=0, Thread *current_thread=Thread::get_current_thread()) const
Attaches a new node, with or without existing parents, to the scene graph below the referenced node o...
This is a 4-by-4 transform matrix.
LVecBase3 get_tex_pos(TextureStage *stage) const
Returns the offset set for the UVW's for the given stage on the current node.
void clear_project_texture(TextureStage *stage)
Undoes the effect of project_texture().
void set_name(const string &name)
Changes the name of the referenced node.
void set_tex_offset(TextureStage *stage, PN_stdfloat u, PN_stdfloat v)
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage...
string get_name() const
Returns the name of the referenced node.
void clear_tag(const string &key)
Removes the value defined for this key on this particular node.
bool is_singleton(Thread *current_thread=Thread::get_current_thread()) const
Returns true if the NodePath contains exactly one node.
void set_state(const RenderState *state, Thread *current_thread=Thread::get_current_thread())
Sets the complete RenderState that will be applied to all nodes at this level and below...
PN_stdfloat get_sa() const
Gets the alpha scale component of the transform.
LVecBase3 get_tex_hpr(TextureStage *stage) const
Returns the 3-D HPR set for the UVW's for the given stage on the current node.
This is the base class for all two-component vectors and points.
string get_net_tag(const string &key) const
Returns the tag value that has been defined on this node, or the nearest ancestor node...
void set_effect(const RenderEffect *effect)
Adds the indicated render effect to the scene graph on this node.
LVecBase3 get_hpr() const
Retrieves the rotation component of the transform.
void set_fluid_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Sets the translation component, without changing the "previous" position, so that the collision syste...
void set_effect(const RenderEffect *effect)
Adds the indicated render effect to the scene graph on this node.
CollideMask get_net_collide_mask(Thread *current_thread=Thread::get_current_thread()) const
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below...
void clear_texture()
Completely removes any texture adjustment that may have been set via set_texture() or set_texture_off...
void set_tex_transform(TextureStage *stage, const TransformState *transform)
Sets the texture matrix on the current node to the indicated transform for the given stage...
void set_billboard_point_eye(PN_stdfloat offset=0.0)
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin...
void clear()
Sets this NodePath to the empty NodePath.
LPoint3 get_pos() const
Retrieves the translation component of the transform.
void set_attrib(const RenderAttrib *attrib, int override=0)
Adds the indicated render attribute to the scene graph on this node.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
static NodePath removed()
Creates a NodePath with the ET_removed error type set.
Represents a set of settings that indicate how a texture is sampled.
bool is_same_graph(const NodePath &other, Thread *current_thread=Thread::get_current_thread()) const
Returns true if the node represented by this NodePath is parented within the same graph as that of th...
This is the base class for all three-component vectors and points.
This is the base class for all three-component vectors and points.
void set_billboard_axis(PN_stdfloat offset=0.0)
Puts a billboard transition on the node such that it will rotate in two dimensions around the up axis...
void set_shear(PN_stdfloat shxy, PN_stdfloat shxz, PN_stdfloat shyz)
Sets the shear component of the transform, leaving translation, rotation, and scale untouched...
static NodePath not_found()
Creates a NodePath with the ET_not_found error type set.
void set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r)
Sets the rotation component of the transform, leaving translation and scale untouched.
bool has_texcoord(const string &texcoord_name) const
Returns true if there are at least some vertices at this node and below that use the named texture co...
bool has_attrib(TypeHandle type) const
Returns true if there is a render attribute of the indicated type defined on this node...
bool is_hidden(DrawMask camera_mask=PandaNode::get_overall_bit()) const
Returns true if the referenced node is hidden from the indicated camera(s) either directly...
PandaNode * node() const
Returns the referenced node of the path.
void clear_attrib(TypeHandle type)
Removes the render attribute of the given type from this node.
void set_sa(PN_stdfloat sa)
Sets the alpha scale component of the transform.
bool operator!=(const NodePath &other) const
Returns true if the two paths are not equivalent.
A thread; that is, a lightweight process.
bool has_parent(Thread *current_thread=Thread::get_current_thread()) const
Returns true if the referenced node has a parent; i.e.
void set_sb(PN_stdfloat sb)
Sets the blue scale component of the transform.
void clear_effect(TypeHandle type)
Removes the render effect of the given type from this node.
LVecBase3 get_scale() const
Retrieves the scale component of the transform.
NodePath get_parent(Thread *current_thread=Thread::get_current_thread()) const
Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node.
LVecBase2 get_tex_scale(TextureStage *stage) const
Returns the scale set for the UV's for the given stage on the current node.
NodePath get_top(Thread *current_thread=Thread::get_current_thread()) const
Returns a singleton NodePath that represents the top of the path, or empty NodePath if this path is e...
void set_tex_pos(TextureStage *stage, PN_stdfloat u, PN_stdfloat v, PN_stdfloat w)
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage...
string encode_to_bam_stream() const
Converts the NodePath object into a single stream of data using a BamWriter, and returns that data as...
void clear_mat()
Completely removes any transform from the referenced node.
const LMatrix4 & get_mat() const
Returns the transform matrix that has been applied to the referenced node, or the identity matrix if ...
void set_pos_hpr_scale(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz)
Completely replaces the transform with new translation, rotation, and scale components.
size_t add_hash(size_t hash) const
Adds the NodePath into the running hash.
void clear_effect(TypeHandle type)
Removes the render effect of the given type from this node.
void set_sg(PN_stdfloat sg)
Sets the alpha scale component of the transform.
void set_prev_transform(const TransformState *transform, Thread *current_thread=Thread::get_current_thread())
Sets the transform that represents this node's "previous" position, one frame ago, for the purposes of detecting motion for accurate collision calculations.
TypeHandle is the identifier used to differentiate C++ class types.
const RenderEffect * get_effect(TypeHandle type) const
Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not...
This is a 3-by-3 transform matrix.
void hide()
Makes the referenced node (and the entire subgraph below this node) invisible to all cameras...
void ls() const
Lists the hierarchy at and below the referenced node.
void set_tex_hpr(TextureStage *stage, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r)
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR...
Defines the properties of a named stage of the multitexture pipeline.
LVecBase3 get_shear() const
Retrieves the shear component of the transform.
void set_tex_rotate(TextureStage *stage, PN_stdfloat r)
Sets a texture matrix on the current node to apply the indicated rotation, clockwise in degrees...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
void set_state(const RenderState *state, Thread *current_thread=Thread::get_current_thread())
Changes the complete state object on this node.
This represents a unique collection of RenderEffect objects that correspond to a particular renderabl...
NodePath get_child(int n, Thread *current_thread=Thread::get_current_thread()) const
Returns a NodePath representing the nth child of the referenced node.
void set_transform(const TransformState *transform, Thread *current_thread=Thread::get_current_thread())
Sets the transform that will be applied to this node and below.
void clear_tex_projector()
Removes the TexProjectorEffect for all stages from this node.
void set_color_scale(const LVecBase4 &scale, int priority=0)
Sets the color scale component of the transform, leaving translation and rotation untouched...
void set_billboard_point_world(PN_stdfloat offset=0.0)
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin...
This is one component of a NodePath.
void list_tags(ostream &out, const string &separator="\) const
Writes a list of all the tag keys assigned to the node to the indicated stream.
void look_at(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Sets the transform on this NodePath so that it rotates to face the indicated point in space...