Panda3D
|
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level interface for manipulating the scene graph. More...
#include "nodePath.h"
Public Types | |
enum | ErrorType { ET_ok = 0 , ET_not_found , ET_removed , ET_fail } |
Public Member Functions | |
NodePath () | |
This constructs an empty NodePath with no nodes. | |
NodePath (const NodePath ©) | |
NodePath (const NodePath &parent, PandaNode *child_node, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a NodePath with the indicated parent NodePath and child node; the child node must be a stashed or unstashed child of the parent. | |
NodePath (const std::string &top_node_name, Thread *current_thread=Thread::get_current_thread()) | |
This constructs a new NodePath with a single node. | |
NodePath (NodePath &&from) noexcept | |
NodePath (PandaNode *node, Thread *current_thread=Thread::get_current_thread()) | |
This constructs a NodePath for the indicated node. | |
size_t | add_hash (size_t hash) const |
Adds the NodePath into the running hash. | |
void | adjust_all_priorities (int adjustment) |
Adds the indicated adjustment amount (which may be negative) to the priority for all transitions on the referenced node, and for all nodes in the subgraph below. | |
void | apply_texture_colors () |
Removes textures from Geoms at this node and below by applying the texture colors to the vertices. | |
NodePath | attach_new_node (const std::string &name, int sort=0, Thread *current_thread=Thread::get_current_thread()) const |
Creates an ordinary PandaNode and attaches it below the current NodePath, returning a new NodePath that references it. | |
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 of this NodePath. | |
bool | calc_tight_bounds (LPoint3 &min_point, LPoint3 &max_point, const NodePath &other=NodePath(), Thread *current_thread=Thread::get_current_thread()) const |
Calculates the minimum and maximum vertices of all Geoms at this NodePath's bottom node and below. | |
void | clear () |
Sets this NodePath to the empty NodePath. | |
void | clear_antialias () |
Completely removes any antialias setting that may have been set on this node via set_antialias(). | |
void | clear_attrib (TypeHandle type) |
Removes the render attribute of the given type from this node. | |
void | clear_audio_volume () |
Completely removes any audio volume from the referenced node. | |
void | clear_billboard () |
Removes any billboard effect from the node. | |
void | clear_bin () |
Completely removes any bin adjustment that may have been set via set_bin() from this particular node. | |
void | clear_clip_plane () |
Completely removes any clip planes that may have been set via set_clip_plane() or set_clip_plane_off() from this particular node. | |
void | clear_clip_plane (const NodePath &clip_plane) |
Removes any reference to the indicated clipping plane from the NodePath. | |
void | clear_color () |
Completely removes any color adjustment from the node. | |
void | clear_color_scale () |
Completely removes any color scale from the referenced node. | |
void | clear_compass () |
Removes any compass effect from the node. | |
void | clear_depth_offset () |
Completely removes any depth-offset adjustment that may have been set on this node via set_depth_offset(). | |
void | clear_depth_test () |
Completely removes any depth-test adjustment that may have been set on this node via set_depth_test(). | |
void | clear_depth_write () |
Completely removes any depth-write adjustment that may have been set on this node via set_depth_write(). | |
void | clear_effect (TypeHandle type) |
Removes the render effect of the given type from this node. | |
void | clear_effects () |
Resets this node to have no render effects. | |
void | clear_fog () |
Completely removes any fog adjustment that may have been set via set_fog() or set_fog_off() from this particular node. | |
void | clear_light () |
Completely removes any lighting operations that may have been set via set_light() or set_light_off() from this particular node. | |
void | clear_light (const NodePath &light) |
Removes any reference to the indicated Light or PolylightNode from the NodePath. | |
void | clear_logic_op () |
Completely removes any logical operation that may have been set on this node via set_logic_op(). | |
void | clear_mat () |
Completely removes any transform from the referenced node. | |
void | clear_material () |
Completely removes any material adjustment that may have been set via set_material() from 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. | |
void | clear_occluder () |
Completely removes any occluders that may have been set via set_occluder() from this particular node. | |
void | clear_occluder (const NodePath &occluder) |
Removes any reference to the indicated occluder from the NodePath. | |
void | clear_project_texture (TextureStage *stage) |
Undoes the effect of project_texture(). | |
void | clear_render_mode () |
Completely removes any render mode adjustment that may have been set on this node via set_render_mode_wireframe() or set_render_mode_filled(). | |
void | clear_scissor () |
Removes the scissor region that was defined at this node level by a previous call to set_scissor(). | |
void | clear_shader () |
void | clear_shader_input (CPT_InternalName id) |
void | clear_tag (const std::string &key) |
Removes the value defined for this key on this particular node. | |
void | clear_tex_gen () |
Removes the texture coordinate generation mode from all texture stages on this node. | |
void | clear_tex_gen (TextureStage *stage) |
Disables automatic texture coordinate generation for the indicated texture stage. | |
void | clear_tex_projector () |
Removes the TexProjectorEffect for all stages from this node. | |
void | clear_tex_projector (TextureStage *stage) |
Removes the TexProjectorEffect for the indicated stage from this node. | |
void | clear_tex_transform () |
Removes all texture matrices from the current node. | |
void | clear_tex_transform (TextureStage *stage) |
Removes the texture matrix on the current node for the given stage. | |
void | clear_texture () |
Completely removes any texture adjustment that may have been set via set_texture() or set_texture_off() from this particular node. | |
void | clear_texture (TextureStage *stage) |
Removes any reference to the indicated texture stage from the NodePath. | |
void | clear_transform (const NodePath &other, Thread *current_thread=Thread::get_current_thread()) |
Sets the transform object on this node to identity, relative to the other node. | |
void | clear_transform (Thread *current_thread=Thread::get_current_thread()) |
Sets the transform object on this node to identity. | |
void | clear_transparency () |
Completely removes any transparency adjustment that may have been set on this node via set_transparency(). | |
void | clear_two_sided () |
Completely removes any two-sided adjustment that may have been set on this node via set_two_sided(). | |
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 sorts after, or zero if they are equivalent. | |
int | compare_to (const WeakNodePath &other) const |
Returns a number less than zero if this NodePath sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent. | |
int | complete_pointers (TypedWritable **plist, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
void | compose_color_scale (const LVecBase4 &scale, int priority=0) |
multiplies the color scale component of the transform, with previous color scale leaving translation and rotation untouched. | |
void | compose_color_scale (PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz, PN_stdfloat sa, int priority=0) |
Sets the color scale component of the transform. | |
NodePath | copy_to (const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) const |
Functions like instance_to(), except a deep copy is made of the referenced node and all of its descendents, which is then parented to the indicated node. | |
int | count_num_descendants () const |
Returns the number of nodes at and below this level. | |
CPT (RenderState) get_net_state(Thread *current_thread | |
CPT (RenderState) get_state(const NodePath &other | |
CPT (TransformState) get_net_prev_transform(Thread *current_thread | |
CPT (TransformState) get_net_transform(Thread *current_thread | |
CPT (TransformState) get_prev_transform(const NodePath &other | |
CPT (TransformState) get_tex_transform(const NodePath &other | |
CPT (TransformState) get_tex_transform(TextureStage *stage) const | |
CPT (TransformState) get_transform(const NodePath &other | |
void | detach_node (Thread *current_thread=Thread::get_current_thread()) |
Disconnects the referenced node from its parent, but does not immediately delete it. | |
void | do_billboard_axis (const NodePath &camera, PN_stdfloat offset) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated. | |
void | do_billboard_point_eye (const NodePath &camera, PN_stdfloat offset) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated. | |
void | do_billboard_point_world (const NodePath &camera, PN_stdfloat offset) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated. | |
vector_uchar | encode_to_bam_stream () const |
Converts the NodePath object into a single stream of data using a BamWriter, and returns that data as a string string. | |
bool | encode_to_bam_stream (vector_uchar &data, BamWriter *writer=nullptr) const |
Converts the NodePath object into a single stream of data using a BamWriter, and stores that data in the indicated string. | |
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 NodePath. | |
NodePath | find (const std::string &path) const |
Searches for a node below the referenced node that matches the indicated string. | |
NodePathCollection | find_all_matches (const std::string &path) const |
Returns the complete set of all NodePaths that begin with this NodePath and can be extended by path. | |
MaterialCollection | find_all_materials () const |
Returns a list of a materials applied to geometry at this node and below. | |
MaterialCollection | find_all_materials (const std::string &name) const |
Returns a list of a materials applied to geometry at this node and below that match the indicated name (which may contain wildcard characters). | |
NodePathCollection | find_all_paths_to (PandaNode *node) const |
Returns the set of all NodePaths that extend from this NodePath down to the indicated node. | |
InternalNameCollection | find_all_texcoords () const |
Returns a list of all texture coordinate sets used by any geometry at this node level and below. | |
InternalNameCollection | find_all_texcoords (const std::string &name) const |
Returns a list of all texture coordinate sets used by any geometry at this node level and below that match the indicated name (which may contain wildcard characters). | |
TextureStageCollection | find_all_texture_stages () const |
Returns a list of a TextureStages applied to geometry at this node and below. | |
TextureStageCollection | find_all_texture_stages (const std::string &name) const |
Returns a list of a TextureStages applied to geometry at this node and below that match the indicated name (which may contain wildcard characters). | |
TextureCollection | find_all_textures () const |
Returns a list of a textures applied to geometry at this node and below. | |
TextureCollection | find_all_textures (const std::string &name) const |
Returns a list of a textures applied to geometry at this node and below that match the indicated name (which may contain wildcard characters). | |
TextureCollection | find_all_textures (TextureStage *stage) const |
Returns a list of a textures on geometry at this node and below that are assigned to the indicated texture stage. | |
InternalNameCollection | find_all_vertex_columns () const |
Returns a list of all vertex array columns stored on some geometry found at this node level and below. | |
InternalNameCollection | find_all_vertex_columns (const std::string &name) const |
Returns a list of all vertex array columns stored on some geometry found at this node level and below that match the indicated name (which may contain wildcard characters). | |
Material * | find_material (const std::string &name) const |
Returns the first material found applied to geometry at this node or below that matches the indicated name (which may contain wildcards). | |
NodePath | find_net_tag (const std::string &key) const |
Returns the lowest ancestor of this node that contains a tag definition with the indicated key, if any, or an empty NodePath if no ancestor of this node contains this tag definition. | |
NodePath | find_path_to (PandaNode *node) const |
Searches for the indicated node below this node and returns the shortest NodePath that connects them. | |
Texture * | find_texture (const std::string &name) const |
Returns the first texture found applied to geometry at this node or below that matches the indicated name (which may contain wildcards). | |
Texture * | find_texture (TextureStage *stage) const |
Returns the first texture found applied to geometry at this node or below that is assigned to the indicated texture stage. | |
TextureStage * | find_texture_stage (const std::string &name) const |
Returns the first TextureStage found applied to geometry at this node or below that matches the indicated name (which may contain wildcards). | |
int | flatten_light () |
Analyzes the geometry below this node and reports the number of vertices, triangles, etc. | |
int | flatten_medium () |
A more thorough flattening than flatten_light(), this first applies all the transforms, colors, and texture matrices from the nodes onto the vertices, and then removes unneeded grouping nodes–nodes that have exactly one child, for instance, but have no special properties in themselves. | |
int | flatten_strong () |
The strongest possible flattening. | |
void | force_recompute_bounds () |
NodePath | get_ancestor (int index, Thread *current_thread=Thread::get_current_thread()) const |
unsigned short | get_antialias () const |
Returns the antialias setting that has been specifically set on this node via set_antialias(), or M_none if no setting has been made. | |
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 not. | |
PN_stdfloat | get_audio_volume () const |
Returns the complete audio volume that has been applied to this node via a previous call to set_audio_volume(), or 1. | |
int | get_bin_draw_order () const |
Returns the drawing order associated with the bin that this particular node was assigned to via set_bin(), or 0 if no bin was assigned. | |
std::string | get_bin_name () const |
Returns the name of the bin that this particular node was assigned to via set_bin(), or the empty string if no bin was assigned. | |
NodePath | get_child (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns a NodePath representing the nth child of the referenced node. | |
NodePathCollection | get_children (Thread *current_thread=Thread::get_current_thread()) const |
CollideMask | get_collide_mask () const |
Returns the union of all of the into_collide_masks for nodes at this level and below. | |
LColor | get_color () const |
Returns the color that has been assigned to the node, or black if no color has been assigned. | |
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_color_scale() and/or set_alpha_scale(), or all 1's (identity) if no scale has been applied to this particular 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 both of them share. | |
int | get_depth_offset () const |
Returns the depth offset value if it has been specified using set_depth_offset, or 0 if not. | |
bool | get_depth_test () const |
Returns true if depth-test rendering has been specifically set on this node via set_depth_test(), or false if depth-test rendering has been specifically disabled. | |
bool | get_depth_write () const |
Returns true if depth-write rendering has been specifically set on this node via set_depth_write(), or false if depth-write rendering has been specifically disabled. | |
PN_stdfloat | get_distance (const NodePath &other) const |
Returns the straight-line distance between this referenced node's coordinate frame's origin, and that of the other node's origin. | |
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. | |
const RenderEffects * | get_effects () const |
Returns the complete RenderEffects that will be applied to this node. | |
ErrorType | get_error_type () const |
Fog * | get_fog () const |
Returns the fog that has been set on this particular node, or NULL if no fog has been set. | |
PN_stdfloat | get_h () const |
PN_stdfloat | get_h (const NodePath &other) const |
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), or an empty NodePath if no ancestor of the referenced node is hidden (and the node should be visible). | |
LVecBase3 | get_hpr () const |
Retrieves the rotation component of the transform. | |
LVecBase3 | get_hpr (const NodePath &other) const |
Returns the relative orientation of the bottom node as seen from the other node. | |
int | get_instance_count () const |
Returns the geometry instance count, or 0 if disabled. | |
int | get_key () const |
Returns an integer that is guaranteed to be the same for all NodePaths that represent the same node instance, and different for all NodePaths that represent a different node instance. | |
LogicOpAttrib::Operation | get_logic_op () const |
Returns the logical operation that has been specifically set on this node via set_logic_op(), or O_none if standard color blending has been specifically set, or if nothing has been specifically set. | |
const LMatrix4 & | get_mat () const |
Returns the transform matrix that has been applied to the referenced node, or the identity matrix if no matrix has been applied. | |
LMatrix4 | get_mat (const NodePath &other) const |
Returns the matrix that describes the coordinate space of the bottom node, relative to the other path's bottom node's coordinate space. | |
std::string | get_name () const |
PN_stdfloat | get_net_audio_volume () const |
Returns the complete audio volume for this node taking highers nodes in the graph into account. | |
std::string | get_net_tag (const std::string &key) const |
PandaNode * | get_node (int index, Thread *current_thread=Thread::get_current_thread()) const |
int | get_num_children (Thread *current_thread=Thread::get_current_thread()) const |
Returns the number of children of the referenced node. | |
int | get_num_nodes (Thread *current_thread=Thread::get_current_thread()) const |
PN_stdfloat | get_p () const |
PN_stdfloat | get_p (const NodePath &other) const |
NodePath | get_parent (Thread *current_thread=Thread::get_current_thread()) const |
LPoint3 | get_pos () const |
Retrieves the translation component of the transform. | |
LPoint3 | get_pos (const NodePath &other) const |
Returns the relative position of the referenced node as seen from the other node. | |
LVector3 | get_pos_delta () const |
Returns the delta vector from this node's position in the previous frame (according to set_prev_transform(), typically set via the use of set_fluid_pos()) and its position in the current frame. | |
LVector3 | get_pos_delta (const NodePath &other) const |
Returns the delta vector from this node's position in the previous frame (according to set_prev_transform(), typically set via the use of set_fluid_pos()) and its position in the current frame, as seen in the indicated node's coordinate space. | |
const TransformState * | get_prev_transform (Thread *current_thread=Thread::get_current_thread()) const |
Returns the transform that has been set as this node's "previous" position. | |
LQuaternion | get_quat () const |
Retrieves the rotation component of the transform. | |
LQuaternion | get_quat (const NodePath &other) const |
Returns the relative orientation of the bottom node as seen from the other node. | |
PN_stdfloat | get_r () const |
PN_stdfloat | get_r (const NodePath &other) const |
LPoint3 | get_relative_point (const NodePath &other, const LVecBase3 &point) const |
Given that the indicated point is in the coordinate system of the other node, returns the same point in this node's coordinate system. | |
LVector3 | get_relative_vector (const NodePath &other, const LVecBase3 &vec) const |
Given that the indicated vector is in the coordinate system of the other node, returns the same vector in this node's coordinate system. | |
RenderModeAttrib::Mode | get_render_mode () const |
Returns the render mode that has been specifically set on this node via set_render_mode(), or M_unchanged if nothing has been set. | |
bool | get_render_mode_perspective () const |
Returns the flag that has been set on this node via set_render_mode_perspective(), or false if no flag has been set. | |
PN_stdfloat | get_render_mode_thickness () const |
Returns the render mode thickness that has been specifically set on this node via set_render_mode(), or 1.0 if nothing has been set. | |
PN_stdfloat | get_sa () const |
Gets the alpha component of the color scale. | |
PN_stdfloat | get_sb () const |
Gets the blue component of the color scale. | |
LVecBase3 | get_scale () const |
Retrieves the scale component of the transform. | |
LVecBase3 | get_scale (const NodePath &other) const |
Returns the relative scale of the bottom node as seen from the other node. | |
PN_stdfloat | get_sg () const |
Gets the green component of the color scale. | |
const Shader * | get_shader () const |
ShaderInput | get_shader_input (CPT_InternalName id) const |
LVecBase3 | get_shear () const |
Retrieves the shear component of the transform. | |
LVecBase3 | get_shear (const NodePath &other) const |
Returns the relative shear of the bottom node as seen from the other node. | |
PN_stdfloat | get_shxy () const |
PN_stdfloat | get_shxy (const NodePath &other) const |
Returns the relative shear of the referenced node as seen from the other node. | |
PN_stdfloat | get_shxz () const |
PN_stdfloat | get_shxz (const NodePath &other) const |
PN_stdfloat | get_shyz () const |
PN_stdfloat | get_shyz (const NodePath &other) const |
int | get_sort (Thread *current_thread=Thread::get_current_thread()) const |
PN_stdfloat | get_sr () const |
Gets the red component of the color scale. | |
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 ancestor of the referenced node is stashed (and the node should be visible). | |
NodePathCollection | get_stashed_children (Thread *current_thread=Thread::get_current_thread()) const |
const RenderState * | get_state (Thread *current_thread=Thread::get_current_thread()) const |
Returns the complete state object set on this node. | |
PN_stdfloat | get_sx () const |
PN_stdfloat | get_sx (const NodePath &other) const |
Returns the relative scale of the referenced node as seen from the other node. | |
PN_stdfloat | get_sy () const |
PN_stdfloat | get_sy (const NodePath &other) const |
PN_stdfloat | get_sz () const |
PN_stdfloat | get_sz (const NodePath &other) const |
std::string | get_tag (const std::string &key) const |
Retrieves the user-defined value that was previously set on this node for the particular key, if any. | |
void | get_tag_keys (vector_string &keys) const |
Fills the given vector up with the list of tags on this PandaNode. | |
RenderAttrib::TexGenMode | get_tex_gen (TextureStage *stage) const |
Returns the texture coordinate generation mode for the given stage, or M_off if there is no explicit mode set for the given stage. | |
LVecBase3 | get_tex_hpr (const NodePath &other, TextureStage *stage) const |
Returns the 3-D HPR set for the UVW's for the given stage on the current node. | |
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. | |
LVecBase2 | get_tex_offset (const NodePath &other, TextureStage *stage) const |
Returns the offset set for the UV's for the given stage on the current node. | |
LVecBase2 | get_tex_offset (TextureStage *stage) const |
Returns the offset set for the UV's for the given stage on the current node. | |
LVecBase3 | get_tex_pos (const NodePath &other, TextureStage *stage) const |
Returns the offset set for the UVW's for the given stage on the current node. | |
LVecBase3 | get_tex_pos (TextureStage *stage) const |
Returns the offset set for the UVW's for the given stage on the current node. | |
NodePath | get_tex_projector_from (TextureStage *stage) const |
Returns the "from" node associated with the TexProjectorEffect on the indicated stage. | |
NodePath | get_tex_projector_to (TextureStage *stage) const |
Returns the "to" node associated with the TexProjectorEffect on the indicated stage. | |
PN_stdfloat | get_tex_rotate (const NodePath &other, TextureStage *stage) const |
Returns the rotation set for the UV's for the given stage on the current node. | |
PN_stdfloat | get_tex_rotate (TextureStage *stage) const |
Returns the rotation set for the UV's for the given stage on the current node. | |
LVecBase2 | get_tex_scale (const NodePath &other, TextureStage *stage) const |
Returns the scale set for the UV's for the given stage on the current node. | |
LVecBase2 | get_tex_scale (TextureStage *stage) const |
Returns the scale set for the UV's for the given stage on the current node. | |
LVecBase3 | get_tex_scale_3d (const NodePath &other, TextureStage *stage) const |
Returns the scale set for the UVW's for the given stage on the current node. | |
LVecBase3 | get_tex_scale_3d (TextureStage *stage) const |
Returns the scale set for the UVW's for the given stage on the current node. | |
Texture * | get_texture () const |
Returns the base-level texture that has been set on this particular node, or NULL if no texture has been set. | |
Texture * | get_texture (TextureStage *stage) const |
Returns the texture that has been set on the indicated stage for this particular node, or NULL if no texture has been set for this stage. | |
const SamplerState & | get_texture_sampler () const |
Returns the sampler state that has been given for the base-level texture that has been set on this particular node. | |
const SamplerState & | get_texture_sampler (TextureStage *stage) const |
Returns the sampler state that has been given for the indicated texture stage that has been set on this particular 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 empty. | |
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. | |
const TransformState * | get_transform (Thread *current_thread=Thread::get_current_thread()) const |
Returns the complete transform object set on this node. | |
TransparencyAttrib::Mode | get_transparency () const |
Returns the transparent rendering that has been specifically set on this node via set_transparency(), or M_none if nontransparent rendering has been specifically set, or if nothing has been specifically set. | |
bool | get_two_sided () const |
Returns true if two-sided rendering has been specifically set on this node via set_two_sided(), or false if one-sided rendering has been specifically set, or if nothing has been specifically set. | |
PN_stdfloat | get_x () const |
PN_stdfloat | get_x (const NodePath &other) const |
PN_stdfloat | get_y () const |
PN_stdfloat | get_y (const NodePath &other) const |
PN_stdfloat | get_z () const |
PN_stdfloat | get_z (const NodePath &other) const |
bool | has_antialias () const |
Returns true if an antialias setting has been explicitly mode on this particular node via set_antialias(). | |
bool | has_attrib (TypeHandle type) const |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not. | |
bool | has_audio_volume () const |
Returns true if an audio volume has been applied to the referenced node, false otherwise. | |
bool | has_billboard () const |
Returns true if there is any billboard effect on the node. | |
bool | has_bin () const |
Returns true if the node has been assigned to the a particular rendering bin via set_bin(), false otherwise. | |
bool | has_clip_plane (const NodePath &clip_plane) const |
Returns true if the indicated clipping plane has been specifically applied to this particular node. | |
bool | has_clip_plane_off () const |
Returns true if all clipping planes have been specifically disabled on this particular node. | |
bool | has_clip_plane_off (const NodePath &clip_plane) const |
Returns true if the indicated clipping plane has been specifically disabled on this particular node. | |
bool | has_color () const |
Returns true if a color has been applied to the given node, false otherwise. | |
bool | has_color_scale () const |
Returns true if a color scale has been applied to the referenced node, false otherwise. | |
bool | has_compass () const |
Returns true if there is any compass effect on the node. | |
bool | has_depth_offset () const |
Returns true if a depth-offset adjustment has been explicitly set on this particular node via set_depth_offset(). | |
bool | has_depth_test () const |
Returns true if a depth-test adjustment has been explicitly set on this particular node via set_depth_test(). | |
bool | has_depth_write () const |
Returns true if a depth-write adjustment has been explicitly set on this particular node via set_depth_write(). | |
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. | |
bool | has_fog () const |
Returns true if a fog has been applied to this particular node via set_fog(), false otherwise. | |
bool | has_fog_off () const |
Returns true if a fog has been specifically disabled on this particular node via set_fog_off(), false otherwise. | |
bool | has_light (const NodePath &light) const |
Returns true if the indicated Light or PolylightNode has been specifically enabled on this particular node. | |
bool | has_light_off () const |
Returns true if all Lights have been specifically disabled on this particular node. | |
bool | has_light_off (const NodePath &light) const |
Returns true if the indicated Light has been specifically disabled on this particular node. | |
bool | has_logic_op () const |
Returns true if a logical operation has been explicitly set on this particular node via set_logic_op(). | |
bool | has_mat () const |
Returns true if a non-identity transform matrix has been applied to the referenced node, false otherwise. | |
bool | has_material () const |
Returns true if a material has been applied to this particular node via set_material(), false otherwise. | |
bool | has_net_tag (const std::string &key) const |
bool | has_occluder (const NodePath &occluder) const |
Returns true if the indicated occluder has been specifically applied to this particular node. | |
bool | has_parent (Thread *current_thread=Thread::get_current_thread()) const |
bool | has_render_mode () const |
Returns true if a render mode has been explicitly set on this particular node via set_render_mode() (or set_render_mode_wireframe() or set_render_mode_filled()), false otherwise. | |
bool | has_scissor () const |
Returns true if a scissor region was defined at this node by a previous call to set_scissor(). | |
bool | has_tag (const std::string &key) const |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set. | |
bool | has_tex_gen (TextureStage *stage) const |
Returns true if there is a mode for automatic texture coordinate generation on the current node for the given stage. | |
bool | has_tex_projector (TextureStage *stage) const |
Returns true if this node has a TexProjectorEffect for the indicated stage, false otherwise. | |
bool | has_tex_transform (TextureStage *stage) const |
Returns true if there is an explicit texture matrix on the current node for the given stage. | |
bool | has_texcoord (const std::string &texcoord_name) const |
Returns true if there are at least some vertices at this node and below that use the named texture coordinate set, false otherwise. | |
bool | has_texture () const |
Returns true if a texture has been applied to this particular node via set_texture(), false otherwise. | |
bool | has_texture (TextureStage *stage) const |
Returns true if texturing has been specifically enabled on this particular node for the indicated stage. | |
bool | has_texture_off () const |
Returns true if texturing has been specifically disabled on this particular node via set_texture_off(), false otherwise. | |
bool | has_texture_off (TextureStage *stage) const |
Returns true if texturing has been specifically disabled on this particular node for the indicated stage. | |
bool | has_transparency () const |
Returns true if a transparent-rendering adjustment has been explicitly set on this particular node via set_transparency(). | |
bool | has_two_sided () const |
Returns true if a two-sided adjustment has been explicitly set on this particular node via set_two_sided(). | |
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 the indicated vertex data column name, false otherwise. | |
void | heads_up (const LPoint3 &point, const LVector3 &up=LVector3::up()) |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction. | |
void | heads_up (const NodePath &other, const LPoint3 &point=LPoint3(0.0, 0.0, 0.0), const LVector3 &up=LVector3::up()) |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction. | |
void | heads_up (const NodePath &other, 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 indicated "up" direction. | |
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 indicated "up" direction. | |
void | hide () |
Makes the referenced node (and the entire subgraph below this node) invisible to all cameras. | |
void | hide (DrawMask camera_mask) |
Makes the referenced node invisible just to the cameras whose camera_mask shares the indicated bits. | |
void | hide_bounds () |
Stops the rendering of the bounding volume begun with show_bounds(). | |
NodePath | instance_to (const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) const |
Adds the referenced node of the NodePath as a child of the referenced node of the indicated other NodePath. | |
NodePath | instance_under_node (const NodePath &other, const std::string &name, int sort=0, Thread *current_thread=Thread::get_current_thread()) const |
Behaves like instance_to(), but implicitly creates a new node to instance the geometry under, and returns a NodePath to that new node. | |
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 NodePath, or false if it is not. | |
bool | is_empty () const |
Returns true if the NodePath contains no nodes. | |
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, or because some ancestor is hidden. | |
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 the other NodePath. | |
bool | is_singleton (Thread *current_thread=Thread::get_current_thread()) const |
Returns true if the NodePath contains exactly one node. | |
bool | is_stashed () const |
Returns true if the referenced node is stashed either directly, or because some ancestor is stashed. | |
void | list_tags () const |
Lists the tags to the nout stream, one per line. | |
void | look_at (const LPoint3 &point, const LVector3 &up=LVector3::up()) |
Sets the hpr on this NodePath so that it rotates to face the indicated point in space. | |
void | look_at (const NodePath &other, const LPoint3 &point=LPoint3(0.0, 0.0, 0.0), const LVector3 &up=LVector3::up()) |
Sets the transform on this NodePath so that it rotates to face the indicated point in space, which is relative to the other NodePath. | |
void | look_at (const NodePath &other, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
Sets the hpr on this NodePath so that it rotates to face the indicated point in space, which is relative to the other NodePath. | |
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. | |
void | ls () const |
Lists the hierarchy at and below the referenced node. | |
void | ls (std::ostream &out, int indent_level=0) const |
Lists the hierarchy at and below the referenced node. | |
PandaNode * | node () const |
Returns the referenced node of the path. | |
operator bool () const | |
Returns true if the NodePath is valid (not empty), or false if it contains no nodes. | |
bool | operator!= (const NodePath &other) const |
Returns true if the two paths are not equivalent. | |
bool | operator!= (const WeakNodePath &other) const |
Returns true if the two paths are not equivalent. | |
bool | operator< (const NodePath &other) const |
Returns true if this NodePath sorts before the other one, false otherwise. | |
bool | operator< (const WeakNodePath &other) const |
Returns true if this NodePath sorts before the other one, false otherwise. | |
void | operator= (const NodePath ©) |
void | operator= (NodePath &&from) noexcept |
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 same order. | |
bool | operator== (const WeakNodePath &other) const |
Returns true if the two paths are equivalent; that is, if they contain the same list of nodes in the same order. | |
void | output (std::ostream &out) const |
Writes a sensible description of the NodePath to the indicated output stream. | |
void | premunge_scene (GraphicsStateGuardianBase *gsg=nullptr) |
Walks through the scene graph beginning at the bottom node, and internally adjusts any GeomVertexFormats for optimal rendering on the indicated GSG. | |
void | prepare_scene (GraphicsStateGuardianBase *gsg) |
Walks through the scene graph beginning at the bottom node, and does whatever initialization is required to render the scene properly with the indicated GSG. | |
void | project_texture (TextureStage *stage, Texture *tex, const NodePath &projector) |
A convenience function to enable projective texturing at this node level and below, using the indicated NodePath (which should contain a LensNode) as the projector. | |
PT (BoundingVolume) get_bounds(Thread *current_thread | |
PT (Material) get_material() const | |
void | remove_node (Thread *current_thread=Thread::get_current_thread()) |
Disconnects the referenced node from the scene graph. | |
void | reparent_to (const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Removes the referenced node of the NodePath from its current parent and attaches it to the referenced node of the indicated NodePath. | |
void | replace_material (Material *mat, Material *new_mat) |
void | replace_texture (Texture *tex, Texture *new_tex) |
Recursively searches the scene graph for references to the given texture, and replaces them with the new texture. | |
void | reverse_ls () const |
Lists the hierarchy at and above the referenced node. | |
int | reverse_ls (std::ostream &out, int indent_level=0) const |
Lists the hierarchy at and above the referenced node. | |
void | set_all_color_scale (PN_stdfloat scale, int priority=0) |
Scales all the color components of the object by the same amount, darkening the object, without (much) affecting alpha. | |
void | set_alpha_scale (PN_stdfloat scale, int priority=0) |
Sets the alpha scale component of the transform without (much) affecting the color scale. | |
void | set_antialias (unsigned short mode, int priority=0) |
Specifies the antialiasing type that should be applied at this node and below. | |
void | set_attrib (const RenderAttrib *attrib, int priority=0) |
void | set_audio_volume (PN_stdfloat volume, int priority=0) |
Sets the audio volume component of the transform. | |
void | set_audio_volume_off (int priority=0) |
Disables any audio volume attribute inherited from above. | |
void | set_billboard_axis (const NodePath &camera, PN_stdfloat offset) |
Puts a billboard transition on the node such that it will rotate in two dimensions around the up axis, towards a specified "camera" instead of to the viewing camera. | |
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_billboard_point_eye (const NodePath &camera, PN_stdfloat offset, bool fixed_depth=false) |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the top of the camera, towards a specified "camera" instead of to the viewing camera. | |
void | set_billboard_point_eye (PN_stdfloat offset=0.0, bool fixed_depth=false) |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the top of the camera. | |
void | set_billboard_point_world (const NodePath &camera, PN_stdfloat offset) |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the sky, towards a specified "camera" instead of to the viewing camera. | |
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, keeping its up vector oriented to the sky. | |
void | set_bin (const std::string &bin_name, int draw_order, int priority=0) |
Assigns the geometry at this level and below to the named rendering bin. | |
void | set_clip_plane (const NodePath &clip_plane, int priority=0) |
Adds the indicated clipping plane to the list of planes that apply to geometry at this node and below. | |
void | set_clip_plane_off (const NodePath &clip_plane, int priority=0) |
Sets the geometry at this level and below to render without being clipped by the indicated PlaneNode. | |
void | set_clip_plane_off (int priority=0) |
Sets the geometry at this level and below to render using no clip_planes at all. | |
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 and below. | |
void | set_color (const LColor &color, int priority=0) |
Applies a scene-graph color to the referenced node. | |
void | set_color (PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0) |
Applies a scene-graph color to the referenced node. | |
void | set_color_off (int priority=0) |
Sets the geometry at this level and below to render using the geometry color. | |
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_color_scale (PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz, PN_stdfloat sa, int priority=0) |
Sets the color scale component of the transform. | |
void | set_color_scale_off (int priority=0) |
Disables any color scale attribute inherited from above. | |
void | set_compass (const NodePath &reference=NodePath()) |
Puts a compass effect on the node, so that it will retain a fixed rotation relative to the reference node (or render if the reference node is empty) regardless of the transforms above it. | |
void | set_depth_offset (int bias, int priority=0) |
This instructs the graphics driver to apply an offset or bias to the generated depth values for rendered polygons, before they are written to the depth buffer. | |
void | set_depth_test (bool depth_test, int priority=0) |
Specifically sets or disables the testing of the depth buffer on this particular node. | |
void | set_depth_write (bool depth_write, int priority=0) |
Specifically sets or disables the writing to the depth buffer on this particular node. | |
void | set_effect (const RenderEffect *effect) |
Adds the indicated render effect to the scene graph on this node. | |
void | set_effects (const RenderEffects *effects) |
Sets the complete RenderEffects that will be applied this node. | |
void | set_fluid_pos (const LVecBase3 &pos) |
Sets the translation component, without changing the "previous" position, so that the collision system will see the node as moving fluidly from its previous position to its new position. | |
void | set_fluid_pos (const NodePath &other, const LVecBase3 &pos) |
Sets the translation component of the transform, relative to the other node. | |
void | set_fluid_pos (const NodePath &other, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
Sets the translation component, without changing the "previous" position, so that the collision system will see the node as moving fluidly from its previous position to its new position. | |
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 system will see the node as moving fluidly from its previous position to its new position. | |
void | set_fluid_x (const NodePath &other, PN_stdfloat x) |
void | set_fluid_x (PN_stdfloat x) |
void | set_fluid_y (const NodePath &other, PN_stdfloat y) |
void | set_fluid_y (PN_stdfloat y) |
void | set_fluid_z (const NodePath &other, PN_stdfloat z) |
void | set_fluid_z (PN_stdfloat z) |
void | set_fog (Fog *fog, int priority=0) |
Sets the geometry at this level and below to render using the indicated fog. | |
void | set_fog_off (int priority=0) |
Sets the geometry at this level and below to render using no fog. | |
void | set_h (const NodePath &other, PN_stdfloat h) |
void | set_h (PN_stdfloat h) |
void | set_hpr (const LVecBase3 &hpr) |
Sets the rotation component of the transform, leaving translation and scale untouched. | |
void | set_hpr (const NodePath &other, const LVecBase3 &hpr) |
Sets the rotation component of the transform, relative to the other node. | |
void | set_hpr (const NodePath &other, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) |
Sets the rotation component of the transform, relative to the other node. | |
void | set_hpr (PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) |
Sets the rotation component of the transform, leaving translation and scale untouched. | |
void | set_hpr_scale (const LVecBase3 &hpr, const LVecBase3 &scale) |
Sets the rotation and scale components of the transform, leaving translation untouched. | |
void | set_hpr_scale (const NodePath &other, const LVecBase3 &hpr, const LVecBase3 &scale) |
Sets the rotation and scale components of the transform, leaving translation untouched. | |
void | set_hpr_scale (const NodePath &other, 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 | 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 | set_instance_count (int instance_count) |
Sets the geometry instance count, or 0 if geometry instancing should be disabled. | |
void | set_light (const NodePath &light, int priority=0) |
Adds the indicated Light or PolylightNode to the list of lights that illuminate geometry at this node and below. | |
void | set_light_off (const NodePath &light, int priority=0) |
Sets the geometry at this level and below to render without using the indicated Light. | |
void | set_light_off (int priority=0) |
Sets the geometry at this level and below to render using no lights at all. | |
void | set_logic_op (LogicOpAttrib::Operation op, int priority=0) |
Specifically sets or disables a logical operation on this particular node. | |
void | set_mat (const LMatrix4 &mat) |
Directly sets an arbitrary 4x4 transform matrix. | |
void | set_mat (const NodePath &other, const LMatrix4 &mat) |
Converts the indicated matrix from the other's coordinate space to the local coordinate space, and applies it to the node. | |
void | set_material (Material *tex, int priority=0) |
Sets the geometry at this level and below to render using the indicated material. | |
void | set_material_off (int priority=0) |
Sets the geometry at this level and below to render using no material. | |
void | set_name (const std::string &name) |
void | set_occluder (const NodePath &occluder) |
Adds the indicated occluder to the list of occluders that apply to geometry at this node and below. | |
void | set_p (const NodePath &other, PN_stdfloat p) |
void | set_p (PN_stdfloat p) |
void | set_pos (const LVecBase3 &pos) |
Sets the translation component of the transform, leaving rotation and scale untouched. | |
void | set_pos (const NodePath &other, const LVecBase3 &pos) |
Sets the translation component of the transform, relative to the other node. | |
void | set_pos (const NodePath &other, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
Sets the translation component of the transform, relative to the other node. | |
void | set_pos (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
void | set_pos_hpr (const LVecBase3 &pos, const LVecBase3 &hpr) |
Sets the translation and rotation component of the transform, leaving scale untouched. | |
void | set_pos_hpr (const NodePath &other, const LVecBase3 &pos, const LVecBase3 &hpr) |
Sets the translation and rotation component of the transform, relative to the other node. | |
void | set_pos_hpr (const NodePath &other, 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, relative to the other node. | |
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. | |
void | set_pos_hpr_scale (const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale) |
Replaces the translation, rotation, and scale components, implicitly setting shear to 0. | |
void | set_pos_hpr_scale (const NodePath &other, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale) |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node, implicitly setting shear to 0. | |
void | set_pos_hpr_scale (const NodePath &other, 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, relative to the other node. | |
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. | |
void | set_pos_hpr_scale_shear (const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale, const LVecBase3 &shear) |
Completely replaces the transform with new translation, rotation, scale, and shear components. | |
void | set_pos_hpr_scale_shear (const NodePath &other, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale, const LVecBase3 &shear) |
Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node. | |
void | set_pos_quat (const LVecBase3 &pos, const LQuaternion &quat) |
Sets the translation and rotation component of the transform, leaving scale untouched. | |
void | set_pos_quat (const NodePath &other, const LVecBase3 &pos, const LQuaternion &quat) |
Sets the translation and rotation component of the transform, relative to the other node. | |
void | set_pos_quat_scale (const LVecBase3 &pos, const LQuaternion &quat, const LVecBase3 &scale) |
Replaces the translation, rotation, and scale components, implicitly setting shear to 0. | |
void | set_pos_quat_scale (const NodePath &other, const LVecBase3 &pos, const LQuaternion &quat, const LVecBase3 &scale) |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node, implicitly setting shear to 0. | |
void | set_pos_quat_scale_shear (const LVecBase3 &pos, const LQuaternion &quat, const LVecBase3 &scale, const LVecBase3 &shear) |
Completely replaces the transform with new translation, rotation, scale, and shear components. | |
void | set_pos_quat_scale_shear (const NodePath &other, const LVecBase3 &pos, const LQuaternion &quat, const LVecBase3 &scale, const LVecBase3 &shear) |
Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node. | |
void | set_prev_transform (const NodePath &other, const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
void | set_prev_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
void | set_quat (const LQuaternion &quat) |
Sets the rotation component of the transform, leaving translation and scale untouched. | |
void | set_quat (const NodePath &other, const LQuaternion &quat) |
Sets the rotation component of the transform, relative to the other node. | |
void | set_quat_scale (const LQuaternion &quat, const LVecBase3 &scale) |
Sets the rotation and scale components of the transform, leaving translation untouched. | |
void | set_quat_scale (const NodePath &other, const LQuaternion &quat, const LVecBase3 &scale) |
Sets the rotation and scale components of the transform, leaving translation untouched. | |
void | set_r (const NodePath &other, PN_stdfloat r) |
void | set_r (PN_stdfloat r) |
void | set_render_mode (RenderModeAttrib::Mode mode, PN_stdfloat thickness, int priority=0) |
Sets up the geometry at this level and below (unless overridden) to render in the specified mode and with the indicated line and/or point thickness. | |
void | set_render_mode_filled (int priority=0) |
Sets up the geometry at this level and below (unless overridden) to render in filled (i.e. | |
void | set_render_mode_filled_wireframe (const LColor &wireframe_color, int priority=0) |
Sets up the geometry at this level and below (unless overridden) to render in filled, but overlay the wireframe on top with a fixed color. | |
void | set_render_mode_perspective (bool perspective, int priority=0) |
Sets up the point geometry at this level and below to render as perspective sprites (that is, billboarded quads). | |
void | set_render_mode_thickness (PN_stdfloat thickness, int priority=0) |
Sets up the point geometry at this level and below to render as thick points (that is, billboarded quads). | |
void | set_render_mode_wireframe (int priority=0) |
Sets up the geometry at this level and below (unless overridden) to render in wireframe mode. | |
void | set_sa (PN_stdfloat sa) |
Sets the alpha component of the color scale. | |
void | set_sb (PN_stdfloat sb) |
Sets the blue component of the color scale. | |
void | set_scale (const LVecBase3 &scale) |
Sets the scale component of the transform, leaving translation and rotation untouched. | |
void | set_scale (const NodePath &other, const LVecBase3 &scale) |
Sets the scale component of the transform, relative to the other node. | |
void | set_scale (const NodePath &other, PN_stdfloat scale) |
Sets the scale component of the transform, relative to the other node. | |
void | set_scale (const NodePath &other, PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) |
Sets the scale component of the transform, relative to the other node. | |
void | set_scale (PN_stdfloat scale) |
Sets the scale component of the transform, leaving translation and rotation untouched. | |
void | set_scale (PN_stdfloat sx, PN_stdfloat sy, PN_stdfloat sz) |
void | set_scissor (const LPoint3 &a, const LPoint3 &b) |
Sets up a scissor region on the nodes rendered at this level and below. | |
void | set_scissor (const LPoint3 &a, const LPoint3 &b, const LPoint3 &c, const LPoint3 &d) |
Sets up a scissor region on the nodes rendered at this level and below. | |
void | set_scissor (const NodePath &other, const LPoint3 &a, const LPoint3 &b) |
Sets up a scissor region on the nodes rendered at this level and below. | |
void | set_scissor (const NodePath &other, const LPoint3 &a, const LPoint3 &b, const LPoint3 &c, const LPoint3 &d) |
Sets up a scissor region on the nodes rendered at this level and below. | |
void | set_scissor (PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) |
Sets up a scissor region on the nodes rendered at this level and below. | |
void | set_sg (PN_stdfloat sg) |
Sets the green component of the color scale. | |
void | set_shader (const Shader *sha, int priority=0) |
void | set_shader_auto (BitMask32 shader_switch, int priority=0) |
overloaded for auto shader customization | |
void | set_shader_auto (int priority=0) |
void | set_shader_input (const ShaderInput &input) |
void | set_shader_input (CPT_InternalName id, const LMatrix3 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LMatrix4 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase2 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase2i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase3 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase3i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase4 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const LVecBase4i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const NodePath &np, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_double &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_float &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_int &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LMatrix3 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LMatrix4 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase2 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase2i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase3 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase3i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase4 &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, const PTA_LVecBase4i &v, int priority=0) |
void | set_shader_input (CPT_InternalName id, int n1, int n2, int n3=0, int n4=0, int priority=0) |
void | set_shader_input (CPT_InternalName id, PN_stdfloat n1, PN_stdfloat n2, PN_stdfloat n3=0, PN_stdfloat n4=0, int priority=0) |
void | set_shader_input (CPT_InternalName id, ShaderBuffer *buf, int priority=0) |
void | set_shader_input (CPT_InternalName id, Texture *tex, bool read, bool write, int z=-1, int n=0, int priority=0) |
void | set_shader_input (CPT_InternalName id, Texture *tex, const SamplerState &sampler, int priority=0) |
void | set_shader_input (CPT_InternalName id, Texture *tex, int priority=0) |
void | set_shader_input (ShaderInput &&input) |
void | set_shader_off (int priority=0) |
void | set_shear (const LVecBase3 &shear) |
Sets the shear component of the transform, leaving translation and rotation untouched. | |
void | set_shear (const NodePath &other, const LVecBase3 &shear) |
Sets the shear component of the transform, relative to the other node. | |
void | set_shear (const NodePath &other, PN_stdfloat shxy, PN_stdfloat shxz, PN_stdfloat shyz) |
Sets the shear component of the transform, relative to the other node. | |
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. | |
void | set_shxy (const NodePath &other, PN_stdfloat shxy) |
void | set_shxy (PN_stdfloat shxy) |
void | set_shxz (const NodePath &other, PN_stdfloat shxz) |
void | set_shxz (PN_stdfloat shxz) |
void | set_shyz (const NodePath &other, PN_stdfloat shyz) |
void | set_shyz (PN_stdfloat shyz) |
void | set_sr (PN_stdfloat sr) |
Sets the red component of the color scale. | |
void | set_state (const NodePath &other, const RenderState *state, Thread *current_thread=Thread::get_current_thread()) |
void | set_state (const RenderState *state, Thread *current_thread=Thread::get_current_thread()) |
Changes the complete state object on this node. | |
void | set_sx (const NodePath &other, PN_stdfloat sx) |
void | set_sx (PN_stdfloat sx) |
Sets the x-scale component of the transform, leaving other components untouched. | |
void | set_sy (const NodePath &other, PN_stdfloat sy) |
void | set_sy (PN_stdfloat sy) |
Sets the y-scale component of the transform, leaving other components untouched. | |
void | set_sz (const NodePath &other, PN_stdfloat sz) |
void | set_sz (PN_stdfloat sz) |
Sets the z-scale component of the transform, leaving other components untouched. | |
void | set_tag (const std::string &key, const std::string &value) |
Associates a user-defined value with a user-defined key which is stored on the node. | |
void | set_tex_gen (TextureStage *stage, RenderAttrib::TexGenMode mode, const LTexCoord3 &constant_value, int priority=0) |
Enables automatic texture coordinate generation for the indicated texture stage. | |
void | set_tex_gen (TextureStage *stage, RenderAttrib::TexGenMode mode, int priority=0) |
void | set_tex_hpr (const NodePath &other, TextureStage *stage, const LVecBase3 &hpr) |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage. | |
void | set_tex_hpr (const NodePath &other, 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, to UVW's for the given stage. | |
void | set_tex_hpr (TextureStage *stage, const LVecBase3 &hpr) |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage. | |
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, to UVW's for the given stage. | |
void | set_tex_offset (const NodePath &other, TextureStage *stage, const LVecBase2 &uv) |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage. | |
void | set_tex_offset (const NodePath &other, 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. | |
void | set_tex_offset (TextureStage *stage, const LVecBase2 &uv) |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage. | |
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. | |
void | set_tex_pos (const NodePath &other, TextureStage *stage, const LVecBase3 &uvw) |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage. | |
void | set_tex_pos (const NodePath &other, 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. | |
void | set_tex_pos (TextureStage *stage, const LVecBase3 &uvw) |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage. | |
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. | |
void | set_tex_projector (TextureStage *stage, const NodePath &from, const NodePath &to, int lens_index=0) |
Establishes a TexProjectorEffect on this node, which can be used to establish projective texturing (but see also the NodePath::project_texture() convenience function), or it can be used to bind this node's texture transform to particular node's position in space, allowing a LerpInterval (for instance) to adjust this node's texture coordinates. | |
void | set_tex_rotate (const NodePath &other, TextureStage *stage, PN_stdfloat r) |
Sets a texture matrix on the current node to apply the indicated rotation, clockwise in degrees, to UV's for the given stage. | |
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, to UV's for the given stage. | |
void | set_tex_scale (const NodePath &other, TextureStage *stage, const LVecBase2 &scale) |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage. | |
void | set_tex_scale (const NodePath &other, TextureStage *stage, const LVecBase3 &scale) |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage. | |
void | set_tex_scale (const NodePath &other, TextureStage *stage, PN_stdfloat scale) |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage. | |
void | set_tex_scale (const NodePath &other, TextureStage *stage, PN_stdfloat su, PN_stdfloat sv) |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage. | |
void | set_tex_scale (const NodePath &other, TextureStage *stage, PN_stdfloat su, PN_stdfloat sv, PN_stdfloat sw) |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage. | |
void | set_tex_scale (TextureStage *stage, const LVecBase2 &scale) |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage. | |
void | set_tex_scale (TextureStage *stage, const LVecBase3 &scale) |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage. | |
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. | |
void | set_tex_scale (TextureStage *stage, PN_stdfloat su, PN_stdfloat sv) |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage. | |
void | set_tex_scale (TextureStage *stage, PN_stdfloat su, PN_stdfloat sv, PN_stdfloat sw) |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage. | |
void | set_tex_transform (const NodePath &other, TextureStage *stage, const TransformState *transform) |
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_texture (Texture *tex, const SamplerState &sampler, int priority=0) |
Adds the indicated texture to the list of textures that will be rendered on the default texture stage. | |
void | set_texture (Texture *tex, int priority=0) |
Adds the indicated texture to the list of textures that will be rendered on the default texture stage. | |
void | set_texture (TextureStage *stage, Texture *tex, const SamplerState &sampler, int priority=0) |
Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage. | |
void | set_texture (TextureStage *stage, Texture *tex, int priority=0) |
Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage. | |
void | set_texture_off (int priority=0) |
Sets the geometry at this level and below to render using no texture, on any stage. | |
void | set_texture_off (TextureStage *stage, int priority=0) |
Sets the geometry at this level and below to render using no texture, on the indicated stage. | |
void | set_transform (const NodePath &other, const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
void | set_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
Changes the complete transform object on this node. | |
void | set_transparency (TransparencyAttrib::Mode mode, int priority=0) |
Specifically sets or disables transparent rendering mode on this particular node. | |
void | set_two_sided (bool two_sided, int priority=0) |
Specifically sets or disables two-sided rendering mode on this particular node. | |
void | set_x (const NodePath &other, PN_stdfloat x) |
void | set_x (PN_stdfloat x) |
Sets the X component of the position transform, leaving other components untouched. | |
void | set_y (const NodePath &other, PN_stdfloat y) |
void | set_y (PN_stdfloat y) |
Sets the Y component of the position transform, leaving other components untouched. | |
void | set_z (const NodePath &other, PN_stdfloat z) |
void | set_z (PN_stdfloat z) |
Sets the Z component of the position transform, leaving other components untouched. | |
void | show () |
Undoes the effect of a previous hide() on this node: makes the referenced node (and the entire subgraph below this node) visible to all cameras. | |
void | show (DrawMask camera_mask) |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits. | |
void | show_bounds () |
Causes the bounding volume of the bottom node and all of its descendants (that is, the bounding volume associated with the the bottom arc) to be rendered, if possible. | |
void | show_through () |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits. | |
void | show_through (DrawMask camera_mask) |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits. | |
void | show_tight_bounds () |
Similar to show_bounds(), this draws a bounding box representing the "tight" bounds of this node and all of its descendants. | |
void | stash (int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Removes the referenced node (and the entire subgraph below this node) from the scene graph in any normal sense. | |
void | stash_to (const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Similar to reparent_to(), but the node is added to its new parent's stashed list, so that the result is equivalent to calling reparent_to() immediately followed by stash(). | |
void | unify_texture_stages (TextureStage *stage) |
Searches through all TextureStages at this node and below. | |
void | unstash (int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Undoes the effect of a previous stash() on this node: makes the referenced node (and the entire subgraph below this node) once again part of the scene graph. | |
void | unstash_all (Thread *current_thread=Thread::get_current_thread()) |
Unstashes this node and all stashed child nodes. | |
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. | |
bool | write_bam_file (const Filename &filename) const |
Writes the contents of this node and below out to a bam file with the indicated filename. | |
bool | write_bam_stream (std::ostream &out) const |
Writes the contents of this node and below out to the indicated stream. | |
void | write_bounds (std::ostream &out) const |
Writes a description of the bounding volume containing the bottom node and all of its descendants to the indicated output stream. | |
void | write_datagram (BamWriter *manager, Datagram &dg) const |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
void | wrt_reparent_to (const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) |
This functions identically to reparent_to(), except the transform on this node is also adjusted so that the node remains in the same place in world coordinates, even if it is reparented into a different coordinate system. | |
Static Public Member Functions | |
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. | |
static NodePath | decode_from_bam_stream (vector_uchar data, BamReader *reader=nullptr) |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts and returns the NodePath on that string. | |
static NodePath | fail () |
Creates a NodePath with the ET_fail error type set. | |
static TypeHandle | get_class_type () |
static int | get_max_search_depth () |
Returns the current setting of the search depth limit. | |
static void | init_type () |
static NodePath | not_found () |
Creates a NodePath with the ET_not_found error type set. | |
static NodePath | removed () |
Creates a NodePath with the ET_removed error type set. | |
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 search for the target node or nodes. | |
Public Attributes | |
TextureStage *stage | const |
Thread * | current_thread = Thread::get_current_thread()) const |
get_ancestor | |
Returns the nth ancestor of the path, where 0 is the NodePath itself and get_num_nodes() - 1 is get_top(). | |
get_children | |
Returns the set of all child nodes of the referenced node. | |
get_error_type | |
If is_empty() is true, this returns a code that represents the reason why the NodePath is empty. | |
get_name | |
Returns the name of the referenced node. | |
get_net_tag | |
Returns the tag value that has been defined on this node, or the nearest ancestor node, for the indicated key. | |
get_node | |
Returns the nth node of the path, where 0 is the referenced (bottom) node and get_num_nodes() - 1 is the top node. | |
get_num_nodes | |
Returns the number of nodes in the path. | |
get_parent | |
Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node. | |
get_python_tags | |
get_sort | |
Returns the sort value of the referenced node within its parent; that is, the sort number passed on the last reparenting operation for this node. | |
get_stashed_children | |
Returns the set of all child nodes of the referenced node that have been stashed. | |
get_tags | |
has_net_tag | |
Returns true if the indicated tag value has been defined on this node or on any ancestor node, or false otherwise. | |
has_parent | |
Returns true if the referenced node has a parent; i.e. | |
set_name | |
Changes the name of the referenced node. | |
Friends | |
class | CullTraverserData |
class | NodePathCollection |
class | WeakNodePath |
class | WorkingNodePath |
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level interface for manipulating the scene graph.
A NodePath is a list of connected nodes from the root of the graph to any sub-node. Each NodePath therefore uniquely describes one instance of a node.
NodePaths themselves are lightweight objects that may easily be copied and passed by value. Their data is stored as a series of NodePathComponents that are stored on the nodes. Holding a NodePath will keep a reference count to all the nodes in the path. However, if any node in the path is removed or reparented (perhaps through a different NodePath), the NodePath will automatically be updated to reflect the changes.
Definition at line 159 of file nodePath.h.
enum NodePath::ErrorType |
Definition at line 163 of file nodePath.h.
|
inline |
This constructs an empty NodePath with no nodes.
Definition at line 17 of file nodePath.I.
Referenced by decode_from_bam_stream(), get_child(), project_texture(), set_billboard_axis(), set_billboard_point_eye(), and set_billboard_point_world().
|
inlineexplicit |
This constructs a new NodePath with a single node.
An ordinary, unattached PandaNode is created with the indicated name.
Definition at line 28 of file nodePath.I.
References Thread::get_pipeline_stage.
|
inlineexplicit |
This constructs a NodePath for the indicated node.
If the node does not have any parents, this creates a singleton NodePath; otherwise, it automatically finds the path from the node to the root. If the node has multiple paths to the root, one path is chosen arbitrarily and a warning message is printed (but see also NodePath::any_path(), below).
Definition at line 45 of file nodePath.I.
References Thread::get_pipeline_stage, and node().
|
explicit |
Constructs a NodePath with the indicated parent NodePath and child node; the child node must be a stashed or unstashed child of the parent.
Definition at line 93 of file nodePath.cxx.
References Thread::get_pipeline_stage, and is_empty().
|
inline |
Definition at line 75 of file nodePath.I.
|
inlinenoexcept |
Definition at line 96 of file nodePath.I.
|
inline |
Adds the NodePath into the running hash.
This is intended to be used by lower-level code that computes a hash for each NodePath. It modifies the hash value passed in by a unique adjustment for each NodePath, and returns the modified hash.
This is similar to the unique integer returned by get_key(), but it is not guaranteed to remain unique beyond the lifetime of this particular NodePath. Once this NodePath destructs, a different NodePath may be created which shares the same hash value.
Definition at line 263 of file nodePath.I.
References pointer_hash::add_hash().
|
inline |
Adds the indicated adjustment amount (which may be negative) to the priority for all transitions on the referenced node, and for all nodes in the subgraph below.
This can be used to force these nodes not to be overridden by a high-level state change above. If the priority would drop below zero, it is set to zero.
Definition at line 1783 of file nodePath.I.
References is_empty(), and node().
|
inlinestatic |
Returns a new NodePath that represents any arbitrary path from the root to the indicated node.
This is the same thing that would be returned by NodePath(node), except that no warning is issued if the path is ambiguous.
Definition at line 61 of file nodePath.I.
References Thread::get_pipeline_stage, and node().
Referenced by Character::cull_callback(), BulletCharacterControllerNode::do_sync_b2p(), BulletGhostNode::do_sync_b2p(), BulletSoftBodyNode::do_sync_b2p(), BulletVehicle::do_sync_b2p(), CharacterJoint::get_local_transforms(), CharacterJoint::get_net_transforms(), ProjectionScreen::recompute(), ProjectionScreen::recompute_if_stale(), and Character::update().
void NodePath::apply_texture_colors | ( | ) |
Removes textures from Geoms at this node and below by applying the texture colors to the vertices.
This is primarily useful to simplify a low-LOD model. The texture colors are replaced by flat colors that approximate the original textures.
Only the bottommost texture on each Geom is used (if there is more than one), and it is applied as if it were M_modulate, and WM_repeat, regardless of its actual settings. If the texture has a simple_ram_image, this may be used if the main image isn't resident.
After this call, there will be no texturing specified at this level and below. Of course, there might still be texturing inherited from above.
Definition at line 5668 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), is_empty(), and node().
|
inline |
Creates an ordinary PandaNode and attaches it below the current NodePath, returning a new NodePath that references it.
Definition at line 388 of file nodePath.I.
References attach_new_node(), fail(), and verify_complete().
NodePath 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 of this NodePath.
This is the preferred way to add nodes to the graph.
If the node was already a child of the parent, this returns a NodePath to the existing child.
This does *not* automatically extend the current NodePath to reflect the attachment; however, a NodePath that does reflect this extension is returned.
Definition at line 598 of file nodePath.cxx.
References fail(), Thread::get_pipeline_stage, node(), and verify_complete().
Referenced by StaticTextFont::StaticTextFont(), NonlinearImager::add_viewer(), attach_new_node(), PGEntry::clear_cursor_def(), copy_to(), MayaPview::doIt(), PortalNode::enable_clipping_planes(), MultitexReducer::flatten(), GeoMipTerrain::generate(), PGFrameStyle::generate_into(), WindowFramework::get_aspect_2d(), WindowFramework::get_camera_group(), PandaFramework::get_mouse(), WindowFramework::get_pixel_2d(), WindowFramework::get_render_2d(), SmoothMover::handle_wrt_reparent(), ShadowManager::init(), instance_under_node(), WindowFramework::load_default_model(), WindowFramework::load_model(), WindowFramework::make_camera(), GraphicsOutput::make_cube_map(), PGEntry::setup_minimal(), FrameRateMeter::setup_window(), SceneGraphAnalyzerMeter::setup_window(), CollisionTraverser::show_collisions(), and PathFollow::start().
bool NodePath::calc_tight_bounds | ( | LPoint3 & | min_point, |
LPoint3 & | max_point, | ||
const NodePath & | other = NodePath(), | ||
Thread * | current_thread = Thread::get_current_thread() ) const |
Calculates the minimum and maximum vertices of all Geoms at this NodePath's bottom node and below.
This is a tight bounding box; it will generally be tighter than the bounding volume returned by get_bounds() (but it is more expensive to compute).
The bounding box is computed relative to the parent node's coordinate system by default. You can optionally specify a different NodePath to compute the bounds relative to. Note that the box is always axis-aligned against the given NodePath's coordinate system, so you might get a differently sized box depending on which node you pass.
The return value is true if any points are within the bounding volume, or false if none are.
Definition at line 5514 of file nodePath.cxx.
References get_transform(), is_empty(), and node().
Referenced by TextPropertiesManager::set_graphic(), and PGButton::setup().
|
inline |
Sets this NodePath to the empty NodePath.
It will no longer point to any node.
Definition at line 118 of file nodePath.I.
void NodePath::clear_antialias | ( | ) |
Completely removes any antialias setting that may have been set on this node via set_antialias().
Definition at line 5054 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Removes the render attribute of the given type from this node.
This node, and the subgraph below, will now inherit the indicated render attribute from the nodes above this one.
Definition at line 479 of file nodePath.I.
References is_empty(), and node().
void NodePath::clear_audio_volume | ( | ) |
Completely removes any audio volume from the referenced node.
This is preferable to simply setting the audio volume to identity, as it also removes the overhead associated with having an audio volume at all.
Definition at line 5104 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_billboard | ( | ) |
Removes any billboard effect from the node.
Definition at line 4874 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
void NodePath::clear_bin | ( | ) |
Completely removes any bin adjustment that may have been set via set_bin() from this particular node.
Definition at line 2876 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_clip_plane | ( | ) |
Completely removes any clip planes that may have been set via set_clip_plane() or set_clip_plane_off() from this particular node.
Definition at line 2585 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_clip_plane | ( | const NodePath & | clip_plane | ) |
Removes any reference to the indicated clipping plane from the NodePath.
Definition at line 2594 of file nodePath.cxx.
References is_empty(), TypedObject::is_of_type(), node(), and PandaNode::set_attrib().
void NodePath::clear_color | ( | ) |
Completely removes any color adjustment from the node.
This allows the natural color of the geometry, or whatever color transitions might be otherwise affecting the geometry, to show instead.
Definition at line 2051 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_color_scale | ( | ) |
Completely removes any color scale from the referenced node.
This is preferable to simply setting the color scale to identity, as it also removes the overhead associated with having a color scale at all.
Definition at line 2105 of file nodePath.cxx.
References is_empty(), and node().
Referenced by WindowFramework::set_wireframe().
void NodePath::clear_compass | ( | ) |
Removes any compass effect from the node.
Definition at line 4903 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
void NodePath::clear_depth_offset | ( | ) |
Completely removes any depth-offset adjustment that may have been set on this node via set_depth_offset().
Definition at line 4707 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_depth_test | ( | ) |
Completely removes any depth-test adjustment that may have been set on this node via set_depth_test().
Definition at line 4594 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_depth_write | ( | ) |
Completely removes any depth-write adjustment that may have been set on this node via set_depth_write().
Definition at line 4651 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Removes the render effect of the given type from this node.
Definition at line 518 of file nodePath.I.
References PandaNode::clear_effect(), is_empty(), and node().
Referenced by clear_scissor().
|
inline |
Resets this node to have no render effects.
Definition at line 547 of file nodePath.I.
References is_empty(), and node().
void NodePath::clear_fog | ( | ) |
Completely removes any fog adjustment that may have been set via set_fog() or set_fog_off() from this particular node.
This allows whatever fogs might be otherwise affecting the geometry to show instead.
Definition at line 4295 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_light | ( | ) |
Completely removes any lighting operations that may have been set via set_light() or set_light_off() from this particular node.
Definition at line 2371 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
Referenced by WindowFramework::set_lighting().
void NodePath::clear_light | ( | const NodePath & | light | ) |
Removes any reference to the indicated Light or PolylightNode from the NodePath.
Definition at line 2382 of file nodePath.cxx.
References PandaNode::as_light(), is_empty(), TypedObject::is_of_type(), node(), PandaNode::set_attrib(), and PandaNode::set_effect().
void NodePath::clear_logic_op | ( | ) |
Completely removes any logical operation that may have been set on this node via set_logic_op().
The geometry at this level and below will subsequently be rendered using standard color blending.
Definition at line 4996 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Completely removes any transform from the referenced node.
Definition at line 755 of file nodePath.I.
References is_empty(), and node().
void NodePath::clear_material | ( | ) |
Completely removes any material adjustment that may have been set via set_material() from this particular node.
Definition at line 4204 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
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.
This allows a subsequent call to flatten_strong() to eliminate all of the ModelNodes.
Returns the number of ModelNodes found.
Definition at line 1983 of file nodePath.I.
References is_empty(), and node().
Referenced by StaticTextFont::StaticTextFont().
void NodePath::clear_occluder | ( | ) |
Completely removes any occluders that may have been set via set_occluder() from this particular node.
Definition at line 2713 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
void NodePath::clear_occluder | ( | const NodePath & | occluder | ) |
Removes any reference to the indicated occluder from the NodePath.
Definition at line 2722 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), TypedObject::is_of_type(), node(), and PandaNode::set_effect().
|
inline |
Undoes the effect of project_texture().
Definition at line 1731 of file nodePath.I.
References clear_tex_gen(), clear_tex_projector(), and clear_texture().
void NodePath::clear_render_mode | ( | ) |
Completely removes any render mode adjustment that may have been set on this node via set_render_mode_wireframe() or set_render_mode_filled().
Definition at line 4444 of file nodePath.cxx.
References is_empty(), and node().
Referenced by PandaFramework::clear_highlight(), and WindowFramework::set_wireframe().
void NodePath::clear_scissor | ( | ) |
Removes the scissor region that was defined at this node level by a previous call to set_scissor().
Definition at line 2832 of file nodePath.cxx.
References clear_effect().
void NodePath::clear_shader | ( | ) |
Definition at line 3326 of file nodePath.cxx.
void NodePath::clear_shader_input | ( | CPT_InternalName | id | ) |
Definition at line 3431 of file nodePath.cxx.
|
inline |
Removes the value defined for this key on this particular node.
After a call to clear_tag(), has_tag() will return false for the indicated key.
Definition at line 2050 of file nodePath.I.
References PandaNode::clear_tag, is_empty(), and node().
void NodePath::clear_tex_gen | ( | ) |
Removes the texture coordinate generation mode from all texture stages on this node.
Definition at line 3666 of file nodePath.cxx.
References is_empty(), and node().
Referenced by clear_project_texture().
void NodePath::clear_tex_gen | ( | TextureStage * | stage | ) |
Disables automatic texture coordinate generation for the indicated texture stage.
Definition at line 3676 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::clear_tex_projector | ( | ) |
Removes the TexProjectorEffect for all stages from this node.
Definition at line 3787 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
Referenced by clear_project_texture().
void NodePath::clear_tex_projector | ( | TextureStage * | stage | ) |
Removes the TexProjectorEffect for the indicated stage from this node.
Definition at line 3765 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), node(), and PandaNode::set_effect().
void NodePath::clear_tex_transform | ( | ) |
Removes all texture matrices from the current node.
Definition at line 3489 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_tex_transform | ( | TextureStage * | stage | ) |
Removes the texture matrix on the current node for the given stage.
Definition at line 3498 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::clear_texture | ( | ) |
Completely removes any texture adjustment that may have been set via set_texture() or set_texture_off() from this particular node.
This allows whatever textures might be otherwise affecting the geometry to show instead.
Definition at line 3067 of file nodePath.cxx.
References is_empty(), and node().
Referenced by clear_project_texture(), and WindowFramework::set_texture().
void NodePath::clear_texture | ( | TextureStage * | stage | ) |
Removes any reference to the indicated texture stage from the NodePath.
Definition at line 3076 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
|
inline |
Sets the transform object on this node to identity, relative to the other node.
This effectively places this node at the same position as the other node.
Definition at line 575 of file nodePath.I.
References set_transform().
|
inline |
Sets the transform object on this node to identity.
Definition at line 556 of file nodePath.I.
References set_transform().
void NodePath::clear_transparency | ( | ) |
Completely removes any transparency adjustment that may have been set on this node via set_transparency().
The geometry at this level and below will subsequently be rendered either transparent or not, to whatever other nodes may have had set_transparency() on them.
Definition at line 4936 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::clear_two_sided | ( | ) |
Completely removes any two-sided adjustment that may have been set on this node via set_two_sided().
The geometry at this level and below will subsequently be rendered either two-sided or one-sided, according to whatever other nodes may have had set_two_sided() on it, or according to the initial state otherwise.
Definition at line 4536 of file nodePath.cxx.
References is_empty(), and node().
Referenced by WindowFramework::set_one_sided_reverse(), WindowFramework::set_two_sided(), and WindowFramework::set_wireframe().
|
inline |
Returns a number less than zero if this NodePath sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.
Two NodePaths are considered equivalent if they consist of exactly the same list of nodes in the same order. Otherwise, they are different; different NodePaths will be ranked in a consistent but undefined ordering; the ordering is useful only for placing the NodePaths in a sorted container like an STL set.
Definition at line 1964 of file nodePath.I.
int NodePath::compare_to | ( | const WeakNodePath & | other | ) | const |
Returns a number less than zero if this NodePath sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.
Two NodePaths are considered equivalent if they consist of exactly the same list of nodes in the same order. Otherwise, they are different; different NodePaths will be ranked in a consistent but undefined ordering; the ordering is useful only for placing the NodePaths in a sorted container like an STL set.
Definition at line 5325 of file nodePath.cxx.
int NodePath::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager ) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Definition at line 6945 of file nodePath.cxx.
References Thread::get_current_thread, Thread::get_pipeline_stage, and node().
Referenced by BillboardEffect::complete_pointers(), CompassEffect::complete_pointers(), and ParamNodePath::complete_pointers().
void NodePath::compose_color_scale | ( | const LVecBase4 & | scale, |
int | priority = 0 ) |
multiplies the color scale component of the transform, with previous color scale leaving translation and rotation untouched.
Definition at line 2115 of file nodePath.cxx.
References ColorScaleAttrib::get_scale, get_state(), is_empty(), node(), and PandaNode::set_attrib().
Referenced by NodePathCollection::compose_color_scale(), and compose_color_scale().
|
inline |
Sets the color scale component of the transform.
Definition at line 995 of file nodePath.I.
References compose_color_scale().
NodePath NodePath::copy_to | ( | const NodePath & | other, |
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) const |
Functions like instance_to(), except a deep copy is made of the referenced node and all of its descendents, which is then parented to the indicated node.
A NodePath to the newly created copy is returned.
Definition at line 537 of file nodePath.cxx.
References attach_new_node(), fail(), LightAttrib::get_num_off_lights, LightAttrib::get_num_on_lights, LightAttrib::get_off_light, LightAttrib::get_on_light, is_empty(), node(), set_state(), and verify_complete().
Referenced by StaticTextFont::StaticTextFont().
|
inline |
Returns the number of nodes at and below this level.
Definition at line 349 of file nodePath.I.
References is_empty().
|
static |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts and returns the NodePath on that string.
Returns NULL on error.
Definition at line 5824 of file nodePath.cxx.
References NodePath(), fail(), DatagramBuffer::get_datagram(), DatagramIterator::get_int32(), DatagramIterator::get_uint8(), TypedObject::is_of_type(), node(), DatagramBuffer::read_header(), BamReader::read_object(), BamReader::resolve(), and BamReader::set_source.
void NodePath::detach_node | ( | Thread * | current_thread = Thread::get_current_thread() | ) |
Disconnects the referenced node from its parent, but does not immediately delete it.
The NodePath retains a pointer to the node, and becomes a singleton NodePath.
This should be called to detach a node from the scene graph, with the option of reattaching it later to the same parent or to a different parent.
In practice, the only difference between remove_node() and detach_node() is that remove_node() also resets the NodePath to empty, which will cause the node to be deleted immediately if there are no other references. On the other hand, detach_node() leaves the NodePath referencing the node, which will keep at least one reference to the node for as long as the NodePath exists.
Definition at line 666 of file nodePath.cxx.
References Thread::get_pipeline_stage, is_empty(), is_singleton(), node(), and PandaNode::reset_prev_transform().
Referenced by SmoothMover::handle_wrt_reparent().
void NodePath::do_billboard_axis | ( | const NodePath & | camera, |
PN_stdfloat | offset ) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated.
This is similar in principle to heads_up().
Definition at line 4746 of file nodePath.cxx.
References TransformState::get_mat, get_parent, get_transform(), heads_up(), is_empty(), and set_quat().
void NodePath::do_billboard_point_eye | ( | const NodePath & | camera, |
PN_stdfloat | offset ) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated.
This is similar in principle to look_at(), although the point_eye billboard effect cannot be achieved using the ordinary look_at() call.
Definition at line 4776 of file nodePath.cxx.
References TransformState::get_mat, get_parent, get_transform(), is_empty(), look_at(), and set_quat().
void NodePath::do_billboard_point_world | ( | const NodePath & | camera, |
PN_stdfloat | offset ) |
Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated.
This is similar in principle to look_at().
Definition at line 4805 of file nodePath.cxx.
References TransformState::get_mat, get_parent, get_transform(), is_empty(), look_at(), and set_quat().
|
inline |
Converts the NodePath object into a single stream of data using a BamWriter, and returns that data as a string string.
Returns empty string on failure. This is similar to write_bam_stream().
This method is used by __reduce__ to handle streaming of NodePaths to a pickle file.
Definition at line 2114 of file nodePath.I.
References encode_to_bam_stream().
Referenced by encode_to_bam_stream().
bool NodePath::encode_to_bam_stream | ( | vector_uchar & | data, |
BamWriter * | writer = nullptr ) const |
Converts the NodePath object into a single stream of data using a BamWriter, and stores that data in the indicated string.
Returns true on success, false on failure.
If the BamWriter is NULL, this behaves the same way as NodePath::write_bam_stream() and PandaNode::encode_to_bam_stream(), in the sense that it only writes this node and all nodes below it.
However, if the BamWriter is not NULL, it behaves very differently. In this case, it encodes the *entire graph* of all nodes connected to the NodePath, including all parent nodes and siblings. This is necessary for correct streaming of related NodePaths and restoration of instances, etc., but it does mean you must detach() a node before writing it if you want to limit the nodes that get written.
This method is used by __reduce__ to handle streaming of NodePaths to a pickle file. The BamWriter case is used by the direct.stdpy.pickle module, while the saner, non-BamWriter case is used when the standard pickle module calls this function.
Definition at line 5762 of file nodePath.cxx.
References Datagram::add_int32(), Datagram::add_uint8(), get_node, get_num_nodes, is_empty(), node(), DatagramBuffer::put_datagram(), BamWriter::set_root_node, BamWriter::set_target, DatagramBuffer::swap_data(), DatagramBuffer::write_header(), and BamWriter::write_object().
|
inlinestatic |
Creates a NodePath with the ET_fail error type set.
Definition at line 148 of file nodePath.I.
Referenced by attach_new_node(), attach_new_node(), copy_to(), decode_from_bam_stream(), find(), find_path_to(), GeoMipTerrain::get_block_node_path(), PhysxActor::get_node_path(), get_tex_projector_from(), get_tex_projector_to(), get_top(), and instance_to().
void NodePath::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 NodePath.
Definition at line 7005 of file nodePath.cxx.
References BamReader::read_pointer().
NodePath NodePath::find | ( | const std::string & | path | ) | const |
Searches for a node below the referenced node that matches the indicated string.
Returns the shortest match found, if any, or an empty NodePath if no match can be found.
The referenced node itself is not considered in the search.
Definition at line 314 of file nodePath.cxx.
References fail(), NodePathCollection::get_path, is_empty(), NodePathCollection::is_empty(), and not_found().
Referenced by SpeedTreeNode::add_from_stf(), and SpeedTreeNode::InstanceList::fillin().
NodePathCollection NodePath::find_all_matches | ( | const std::string & | path | ) | const |
Returns the complete set of all NodePaths that begin with this NodePath and can be extended by path.
The shortest paths will be listed first.
The referenced node itself is not considered in the search.
Definition at line 356 of file nodePath.cxx.
References is_empty(), and verify_complete().
Referenced by MeshDrawer::geometry(), PhysxCcdSkeletonDesc::set_from_node_path(), PhysxClothMeshDesc::set_from_node_path(), PhysxConvexMeshDesc::set_from_node_path(), PhysxTriangleMeshDesc::set_from_node_path(), and unstash_all().
MaterialCollection NodePath::find_all_materials | ( | ) | const |
Returns a list of a materials applied to geometry at this node and below.
Definition at line 4137 of file nodePath.cxx.
References MaterialCollection::add_material(), is_empty(), and node().
MaterialCollection NodePath::find_all_materials | ( | const std::string & | name | ) | const |
Returns a list of a materials applied to geometry at this node and below that match the indicated name (which may contain wildcard characters).
Definition at line 4155 of file nodePath.cxx.
References MaterialCollection::add_material(), is_empty(), GlobPattern::matches(), and node().
NodePathCollection NodePath::find_all_paths_to | ( | PandaNode * | node | ) | const |
Returns the set of all NodePaths that extend from this NodePath down to the indicated node.
The shortest paths will be listed first.
Definition at line 369 of file nodePath.cxx.
References FindApproxPath::add_match_many(), FindApproxPath::add_match_pointer(), is_empty(), node(), and verify_complete().
InternalNameCollection NodePath::find_all_texcoords | ( | ) | const |
Returns a list of all texture coordinate sets used by any geometry at this node level and below.
Definition at line 3922 of file nodePath.cxx.
References InternalNameCollection::add_name(), is_empty(), and node().
InternalNameCollection NodePath::find_all_texcoords | ( | const std::string & | name | ) | const |
Returns a list of all texture coordinate sets used by any geometry at this node level and below that match the indicated name (which may contain wildcard characters).
Definition at line 3945 of file nodePath.cxx.
References InternalNameCollection::add_name(), InternalName::find_ancestor(), InternalName::get_net_basename(), InternalName::get_top(), is_empty(), GlobPattern::matches(), and node().
TextureStageCollection NodePath::find_all_texture_stages | ( | ) | const |
Returns a list of a TextureStages applied to geometry at this node and below.
Definition at line 4071 of file nodePath.cxx.
References TextureStageCollection::add_texture_stage(), is_empty(), and node().
TextureStageCollection NodePath::find_all_texture_stages | ( | const std::string & | name | ) | const |
Returns a list of a TextureStages applied to geometry at this node and below that match the indicated name (which may contain wildcard characters).
Definition at line 4103 of file nodePath.cxx.
References TextureStageCollection::add_texture_stage(), TextureStage::get_name, is_empty(), GlobPattern::matches(), and node().
TextureCollection NodePath::find_all_textures | ( | ) | const |
Returns a list of a textures applied to geometry at this node and below.
Definition at line 3999 of file nodePath.cxx.
References TextureCollection::add_texture(), is_empty(), and node().
Referenced by StaticTextFont::StaticTextFont().
TextureCollection NodePath::find_all_textures | ( | const std::string & | name | ) | const |
Returns a list of a textures applied to geometry at this node and below that match the indicated name (which may contain wildcard characters).
Definition at line 4017 of file nodePath.cxx.
References TextureCollection::add_texture(), is_empty(), GlobPattern::matches(), and node().
TextureCollection NodePath::find_all_textures | ( | TextureStage * | stage | ) | const |
Returns a list of a textures on geometry at this node and below that are assigned to the indicated texture stage.
Definition at line 4040 of file nodePath.cxx.
References TextureCollection::add_texture(), is_empty(), and node().
InternalNameCollection NodePath::find_all_vertex_columns | ( | ) | const |
Returns a list of all vertex array columns stored on some geometry found at this node level and below.
Definition at line 3880 of file nodePath.cxx.
References InternalNameCollection::add_name(), is_empty(), and node().
InternalNameCollection NodePath::find_all_vertex_columns | ( | const std::string & | name | ) | const |
Returns a list of all vertex array columns stored on some geometry found at this node level and below that match the indicated name (which may contain wildcard characters).
Definition at line 3899 of file nodePath.cxx.
References InternalNameCollection::add_name(), InternalName::get_name, is_empty(), GlobPattern::matches(), and node().
Material * NodePath::find_material | ( | const std::string & | name | ) | const |
Returns the first material found applied to geometry at this node or below that matches the indicated name (which may contain wildcards).
Returns the material if it is found, or NULL if it is not.
Definition at line 4127 of file nodePath.cxx.
References is_empty(), and node().
NodePath NodePath::find_net_tag | ( | const std::string & | key | ) | const |
Returns the lowest ancestor of this node that contains a tag definition with the indicated key, if any, or an empty NodePath if no ancestor of this node contains this tag definition.
See set_tag().
Definition at line 5680 of file nodePath.cxx.
References get_parent, has_tag(), is_empty(), and not_found().
Searches for the indicated node below this node and returns the shortest NodePath that connects them.
Definition at line 332 of file nodePath.cxx.
References FindApproxPath::add_match_many(), FindApproxPath::add_match_pointer(), fail(), NodePathCollection::get_path, is_empty(), NodePathCollection::is_empty(), node(), and not_found().
Texture * NodePath::find_texture | ( | const std::string & | name | ) | const |
Returns the first texture found applied to geometry at this node or below that matches the indicated name (which may contain wildcards).
Returns the texture if it is found, or NULL if it is not.
Definition at line 3978 of file nodePath.cxx.
References is_empty(), and node().
Texture * NodePath::find_texture | ( | TextureStage * | stage | ) | const |
Returns the first texture found applied to geometry at this node or below that is assigned to the indicated texture stage.
Returns the texture if it is found, or NULL if it is not.
Definition at line 3990 of file nodePath.cxx.
References is_empty(), and node().
TextureStage * NodePath::find_texture_stage | ( | const std::string & | name | ) | const |
Returns the first TextureStage found applied to geometry at this node or below that matches the indicated name (which may contain wildcards).
Returns the TextureStage if it is found, or NULL if it is not.
Definition at line 4060 of file nodePath.cxx.
References is_empty(), and node().
int NodePath::flatten_light | ( | ) |
Analyzes the geometry below this node and reports the number of vertices, triangles, etc.
This is the same information reported by the bam-info program.
Lightly flattens out the hierarchy below this node by applying transforms, colors, and texture matrices from the nodes onto the vertices, but does not remove any nodes.
This can result in improved rendering performance because there will be fewer transforms in the resulting scene graph, but the number of nodes will remain the same.
In particular, any NodePaths that reference nodes within this hierarchy will not be damaged. However, since this operation will remove transforms from the scene graph, it may be dangerous to apply to nodes where you expect to dynamically modify the transform, or where you expect the geometry to remain in a particular local coordinate system.
The return value is always 0, since flatten_light does not remove any nodes.
Definition at line 5590 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), is_empty(), and node().
Referenced by StaticTextFont::StaticTextFont().
int NodePath::flatten_medium | ( | ) |
A more thorough flattening than flatten_light(), this first applies all the transforms, colors, and texture matrices from the nodes onto the vertices, and then removes unneeded grouping nodes–nodes that have exactly one child, for instance, but have no special properties in themselves.
This results in improved performance over flatten_light() because the number of nodes in the scene graph is reduced.
The return value is the number of nodes removed.
Definition at line 5610 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), SceneGraphReducer::collect_vertex_data(), SceneGraphReducer::flatten(), is_empty(), SceneGraphReducer::make_compatible_state(), node(), and SceneGraphReducer::unify().
int NodePath::flatten_strong | ( | ) |
The strongest possible flattening.
This first applies all of the transforms to the vertices, as in flatten_medium(), but then it will combine sibling nodes together when possible, in addition to removing unnecessary parent-child nodes. This can result in substantially fewer nodes, but any nicely-grouped hierachical bounding volumes may be lost.
It is generally a good idea to apply this kind of flattening only to nodes that will be culled largely as a single unit, like a car. Applying this to an entire scene may result in overall poorer performance because of less- effective culling.
Definition at line 5638 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), SceneGraphReducer::collect_vertex_data(), SceneGraphReducer::flatten(), is_empty(), SceneGraphReducer::make_compatible_state(), node(), and SceneGraphReducer::unify().
unsigned short NodePath::get_antialias | ( | ) | const |
Returns the antialias setting that has been specifically set on this node via set_antialias(), or M_none if no setting has been made.
Definition at line 5075 of file nodePath.cxx.
References AntialiasAttrib::get_mode, is_empty(), and node().
|
inline |
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not.
This checks only what is set on this particular node level, and has nothing to do with what render attributes may be inherited from parent nodes.
Definition at line 458 of file nodePath.I.
References is_empty(), and node().
PN_stdfloat NodePath::get_audio_volume | ( | ) | const |
Returns the complete audio volume that has been applied to this node via a previous call to set_audio_volume(), or 1.
(identity) if no volume has been applied to this particular node.
Definition at line 5153 of file nodePath.cxx.
References AudioVolumeAttrib::get_volume, and node().
int NodePath::get_bin_draw_order | ( | ) | const |
Returns the drawing order associated with the bin that this particular node was assigned to via set_bin(), or 0 if no bin was assigned.
Definition at line 2915 of file nodePath.cxx.
References CullBinAttrib::get_draw_order, is_empty(), and node().
string NodePath::get_bin_name | ( | ) | const |
Returns the name of the bin that this particular node was assigned to via set_bin(), or the empty string if no bin was assigned.
Definition at line 2897 of file nodePath.cxx.
References CullBinAttrib::get_bin_name, is_empty(), and node().
|
inline |
Returns a NodePath representing the nth child of the referenced node.
Definition at line 336 of file nodePath.I.
References NodePath(), get_num_children(), and Thread::get_pipeline_stage.
Referenced by StaticTextFont::StaticTextFont(), PandaFramework::event_arrow_down(), PandaFramework::hide_collision_solids(), EggLoader::reparent_decals(), PandaFramework::show_collision_solids(), and PSSMCameraRig::update().
|
inlinestatic |
Definition at line 1047 of file nodePath.h.
|
inline |
Returns the union of all of the into_collide_masks for nodes at this level and below.
This is the same thing as node()->get_net_collide_mask().
If you want to return what the into_collide_mask of this node itself is, without regard to its children, use node()->get_into_collide_mask().
Definition at line 1898 of file nodePath.I.
References BitMask< uint32_t, 32 >::all_off(), PandaNode::get_net_collide_mask(), is_empty(), and node().
LColor NodePath::get_color | ( | ) | const |
Returns the color that has been assigned to the node, or black if no color has been assigned.
Definition at line 2071 of file nodePath.cxx.
References ColorAttrib::get_color, ColorAttrib::get_color_type, is_empty(), and node().
const LVecBase4 & NodePath::get_color_scale | ( | ) | const |
Returns the complete color scale vector that has been applied to this node via a previous call to set_color_scale() and/or set_alpha_scale(), or all 1's (identity) if no scale has been applied to this particular node.
Definition at line 2239 of file nodePath.cxx.
References ColorScaleAttrib::get_scale, is_empty(), and node().
Referenced by CPT(), get_sa(), get_sb(), get_sg(), get_sr(), set_sa(), set_sb(), set_sg(), and set_sr().
|
inline |
Returns the lowest NodePath that both of these two NodePaths have in common: the first ancestor that both of them share.
If the two NodePaths are unrelated, returns NodePath::not_found().
Definition at line 311 of file nodePath.I.
References not_found().
int NodePath::get_depth_offset | ( | ) | const |
Returns the depth offset value if it has been specified using set_depth_offset, or 0 if not.
Definition at line 4728 of file nodePath.cxx.
References DepthOffsetAttrib::get_offset, is_empty(), and node().
bool NodePath::get_depth_test | ( | ) | const |
Returns true if depth-test rendering has been specifically set on this node via set_depth_test(), or false if depth-test rendering has been specifically disabled.
If nothing has been specifically set, returns true. See also has_depth_test().
Definition at line 4617 of file nodePath.cxx.
References DepthTestAttrib::get_mode, is_empty(), and node().
bool NodePath::get_depth_write | ( | ) | const |
Returns true if depth-write rendering has been specifically set on this node via set_depth_write(), or false if depth-write rendering has been specifically disabled.
If nothing has been specifically set, returns true. See also has_depth_write().
Definition at line 4674 of file nodePath.cxx.
References DepthWriteAttrib::get_mode, is_empty(), and node().
|
inline |
Returns the straight-line distance between this referenced node's coordinate frame's origin, and that of the other node's origin.
Definition at line 978 of file nodePath.I.
References get_pos().
|
inline |
Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not.
Definition at line 499 of file nodePath.I.
References is_empty(), and node().
|
inline |
Returns the complete RenderEffects that will be applied to this node.
Definition at line 538 of file nodePath.I.
References is_empty(), and node().
Fog * NodePath::get_fog | ( | ) | const |
Returns the fog that has been set on this particular node, or NULL if no fog has been set.
This is not necessarily the fog that will be applied to the geometry at or below this level, as another fog at a higher or lower level may override.
Definition at line 4345 of file nodePath.cxx.
References FogAttrib::get_fog, is_empty(), and node().
|
inline |
Definition at line 655 of file nodePath.I.
|
inline |
Definition at line 844 of file nodePath.I.
NodePath 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), or an empty NodePath if no ancestor of the referenced node is hidden (and the node should be visible).
Definition at line 5188 of file nodePath.cxx.
References PandaNode::get_draw_control_mask, PandaNode::get_draw_show_mask, NodePathComponent::get_next(), NodePathComponent::get_node(), Thread::get_pipeline_stage, PandaNode::is_overall_hidden, node(), and not_found().
Referenced by is_hidden(), and PandaFramework::show_collision_solids().
LVecBase3 NodePath::get_hpr | ( | ) | const |
Retrieves the rotation component of the transform.
Definition at line 1108 of file nodePath.cxx.
References TransformState::get_hpr, get_transform(), TransformState::has_hpr(), and is_empty().
Referenced by CDistributedSmoothNodeBase::broadcast_pos_hpr_full(), CDistributedSmoothNodeBase::broadcast_pos_hpr_xyh(), SmoothMover::handle_wrt_reparent(), CDistributedSmoothNodeBase::initialize(), and CLerpNodePathInterval::priv_step().
LVecBase3 NodePath::get_hpr | ( | const NodePath & | other | ) | const |
Returns the relative orientation of the bottom node as seen from the other node.
Definition at line 1587 of file nodePath.cxx.
References TransformState::get_hpr, get_transform(), TransformState::has_hpr(), and is_empty().
int NodePath::get_instance_count | ( | ) | const |
Returns the geometry instance count, or 0 if disabled.
See set_instance_count.
Definition at line 3413 of file nodePath.cxx.
References ShaderAttrib::get_instance_count, is_empty(), and node().
|
inline |
Returns an integer that is guaranteed to be the same for all NodePaths that represent the same node instance, and different for all NodePaths that represent a different node instance.
The same key will be returned for a particular instance as long as at least one NodePath exists that represents that instance; if all NodePaths for a particular instance destruct and a new one is later created, it may have a different index. However, a given key will never be reused for a different instance (unless the app has been running long enough that we overflow the integer key value).
Definition at line 244 of file nodePath.I.
References is_empty().
Referenced by remove_node().
LogicOpAttrib::Operation NodePath::get_logic_op | ( | ) | const |
Returns the logical operation that has been specifically set on this node via set_logic_op(), or O_none if standard color blending has been specifically set, or if nothing has been specifically set.
See also has_logic_op(). This does not necessarily imply that the geometry will or will not be rendered with the given logical operation, as there may be other nodes that override.
Definition at line 5026 of file nodePath.cxx.
References LogicOpAttrib::get_operation, is_empty(), and node().
|
inline |
Returns the transform matrix that has been applied to the referenced node, or the identity matrix if no matrix has been applied.
Definition at line 775 of file nodePath.I.
References is_empty(), and node().
Referenced by GraphicsStateGuardian::fetch_specified_member(), GraphicsStateGuardian::fetch_specified_part(), NurbsSurfaceEvaluator::get_vertex(), and PGEntry::xform().
LMatrix4 NodePath::get_mat | ( | const NodePath & | other | ) | const |
Returns the matrix that describes the coordinate space of the bottom node, relative to the other path's bottom node's coordinate space.
Definition at line 1932 of file nodePath.cxx.
References TransformState::get_mat, and get_transform().
|
inlinestatic |
Returns the current setting of the search depth limit.
See set_max_search_depth.
Definition at line 179 of file nodePath.I.
PN_stdfloat NodePath::get_net_audio_volume | ( | ) | const |
Returns the complete audio volume for this node taking highers nodes in the graph into account.
Definition at line 5169 of file nodePath.cxx.
References AudioVolumeAttrib::get_volume.
|
inline |
Returns the number of children of the referenced node.
Definition at line 327 of file nodePath.I.
References is_empty().
Referenced by PandaFramework::event_arrow_down(), get_child(), PandaFramework::hide_collision_solids(), EggLoader::reparent_decals(), and PandaFramework::show_collision_solids().
|
inline |
Definition at line 660 of file nodePath.I.
|
inline |
Definition at line 849 of file nodePath.I.
LPoint3 NodePath::get_pos | ( | ) | const |
Retrieves the translation component of the transform.
Definition at line 1042 of file nodePath.cxx.
References TransformState::get_pos, get_transform(), and is_empty().
Referenced by PathFind::add_obstacle_to_mesh(), Arrival::arrival_activate(), MeshDrawer::begin(), CDistributedSmoothNodeBase::broadcast_pos_hpr_full(), CDistributedSmoothNodeBase::broadcast_pos_hpr_xy(), CDistributedSmoothNodeBase::broadcast_pos_hpr_xyh(), PathFollow::check_if_possible(), Arrival::do_arrival(), Evade::do_evade(), Flee::do_flee(), AIBehaviors::do_flock(), PathFollow::do_follow(), ObstacleAvoidance::do_obstacle_avoidance(), Pursue::do_pursue(), Seek::do_seek(), Wander::do_wander(), Evade::evade_activate(), Flee::flee_activate(), get_distance(), SmoothMover::handle_wrt_reparent(), heads_up(), heads_up(), CDistributedSmoothNodeBase::initialize(), look_at(), look_at(), ObstacleAvoidance::obstacle_detection(), PathFind::path_find(), PathFind::path_find(), CConstrainPosHprInterval::priv_step(), CConstrainPosInterval::priv_step(), set_fluid_pos(), set_pos(), set_x(), set_y(), set_z(), and AICharacter::update().
LPoint3 NodePath::get_pos | ( | const NodePath & | other | ) | const |
Returns the relative position of the referenced node as seen from the other node.
Definition at line 1506 of file nodePath.cxx.
References TransformState::get_pos, get_transform(), and is_empty().
LVector3 NodePath::get_pos_delta | ( | ) | const |
Returns the delta vector from this node's position in the previous frame (according to set_prev_transform(), typically set via the use of set_fluid_pos()) and its position in the current frame.
This is the vector used to determine collisions. Generally, if the node was last repositioned via set_pos(), the delta will be zero; if it was adjusted via set_fluid_pos(), the delta will represent the change from the previous frame's position.
Definition at line 1057 of file nodePath.cxx.
References TransformState::get_pos, get_prev_transform(), get_transform(), and is_empty().
Referenced by CollisionLevelStateBase::prepare_collider().
LVector3 NodePath::get_pos_delta | ( | const NodePath & | other | ) | const |
Returns the delta vector from this node's position in the previous frame (according to set_prev_transform(), typically set via the use of set_fluid_pos()) and its position in the current frame, as seen in the indicated node's coordinate space.
This is the vector used to determine collisions. Generally, if the node was last repositioned via set_pos(), the delta will be zero; if it was adjusted via set_fluid_pos(), the delta will represent the change from the previous frame's position.
Definition at line 1521 of file nodePath.cxx.
References TransformState::get_pos, get_prev_transform(), get_transform(), and is_empty().
const TransformState * NodePath::get_prev_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const |
Returns the transform that has been set as this node's "previous" position.
See set_prev_transform().
Definition at line 881 of file nodePath.cxx.
References is_empty(), and node().
Referenced by get_pos_delta(), get_pos_delta(), CLerpNodePathInterval::priv_step(), and wrt_reparent_to().
LQuaternion NodePath::get_quat | ( | ) | const |
Retrieves the rotation component of the transform.
Definition at line 1130 of file nodePath.cxx.
References TransformState::get_quat, get_transform(), and is_empty().
Referenced by CConstrainHprInterval::priv_step(), CConstrainPosHprInterval::priv_step(), and CLerpNodePathInterval::priv_step().
LQuaternion NodePath::get_quat | ( | const NodePath & | other | ) | const |
Returns the relative orientation of the bottom node as seen from the other node.
Definition at line 1630 of file nodePath.cxx.
References TransformState::get_quat, get_transform(), and is_empty().
|
inline |
Definition at line 665 of file nodePath.I.
|
inline |
Definition at line 854 of file nodePath.I.
LPoint3 NodePath::get_relative_point | ( | const NodePath & | other, |
const LVecBase3 & | point ) const |
Given that the indicated point is in the coordinate system of the other node, returns the same point in this node's coordinate system.
Definition at line 1957 of file nodePath.cxx.
References TransformState::get_mat, and get_transform().
Referenced by CPT(), MeshDrawer::geometry(), and MeshDrawer::link_segment().
LVector3 NodePath::get_relative_vector | ( | const NodePath & | other, |
const LVecBase3 & | vec ) const |
Given that the indicated vector is in the coordinate system of the other node, returns the same vector in this node's coordinate system.
Definition at line 1968 of file nodePath.cxx.
References TransformState::get_mat, and get_transform().
Referenced by MeshDrawer::begin(), ObstacleAvoidance::do_obstacle_avoidance(), Wander::do_wander(), and ObstacleAvoidance::obstacle_detection().
RenderModeAttrib::Mode NodePath::get_render_mode | ( | ) | const |
Returns the render mode that has been specifically set on this node via set_render_mode(), or M_unchanged if nothing has been set.
Definition at line 4465 of file nodePath.cxx.
References RenderModeAttrib::get_mode, is_empty(), and node().
bool NodePath::get_render_mode_perspective | ( | ) | const |
Returns the flag that has been set on this node via set_render_mode_perspective(), or false if no flag has been set.
Definition at line 4499 of file nodePath.cxx.
References RenderModeAttrib::get_perspective, is_empty(), and node().
PN_stdfloat NodePath::get_render_mode_thickness | ( | ) | const |
Returns the render mode thickness that has been specifically set on this node via set_render_mode(), or 1.0 if nothing has been set.
Definition at line 4482 of file nodePath.cxx.
References RenderModeAttrib::get_thickness, is_empty(), and node().
|
inline |
Gets the alpha component of the color scale.
Definition at line 1079 of file nodePath.I.
References get_color_scale().
|
inline |
Gets the blue component of the color scale.
Definition at line 1070 of file nodePath.I.
References get_color_scale().
LVecBase3 NodePath::get_scale | ( | ) | const |
Retrieves the scale component of the transform.
Definition at line 1193 of file nodePath.cxx.
References TransformState::get_scale, get_transform(), and is_empty().
Referenced by BulletCharacterControllerNode::do_sync_b2p(), BulletGhostNode::do_sync_b2p(), BulletSoftBodyNode::do_sync_b2p(), get_sx(), and PT().
LVecBase3 NodePath::get_scale | ( | const NodePath & | other | ) | const |
Returns the relative scale of the bottom node as seen from the other node.
Definition at line 1695 of file nodePath.cxx.
References TransformState::get_scale, get_transform(), and is_empty().
|
inline |
Gets the green component of the color scale.
Definition at line 1061 of file nodePath.I.
References get_color_scale().
const Shader * NodePath::get_shader | ( | ) | const |
Definition at line 3341 of file nodePath.cxx.
ShaderInput NodePath::get_shader_input | ( | CPT_InternalName | id | ) | const |
Definition at line 3396 of file nodePath.cxx.
LVecBase3 NodePath::get_shear | ( | ) | const |
Retrieves the shear component of the transform.
Definition at line 1241 of file nodePath.cxx.
References TransformState::get_shear, get_transform(), and is_empty().
Referenced by get_shxy().
LVecBase3 NodePath::get_shear | ( | const NodePath & | other | ) | const |
Returns the relative shear of the bottom node as seen from the other node.
Definition at line 1760 of file nodePath.cxx.
References TransformState::get_shear, get_transform(), and is_empty().
|
inline |
Definition at line 708 of file nodePath.I.
|
inline |
Returns the relative shear of the referenced node as seen from the other node.
Definition at line 906 of file nodePath.I.
References get_shear().
|
inline |
Definition at line 713 of file nodePath.I.
|
inline |
Definition at line 911 of file nodePath.I.
|
inline |
Definition at line 718 of file nodePath.I.
|
inline |
Definition at line 916 of file nodePath.I.
|
inline |
Gets the red component of the color scale.
Definition at line 1052 of file nodePath.I.
References get_color_scale().
NodePath 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 ancestor of the referenced node is stashed (and the node should be visible).
Definition at line 5262 of file nodePath.cxx.
References PandaNode::find_stashed(), NodePathComponent::get_next(), NodePathComponent::get_node(), Thread::get_pipeline_stage, node(), and not_found().
Referenced by is_stashed().
const RenderState * NodePath::get_state | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const |
Returns the complete state object set on this node.
Definition at line 721 of file nodePath.cxx.
References is_empty(), and node().
Referenced by compose_color_scale(), NodePathCollection::compose_color_scale(), CLerpNodePathInterval::priv_step(), set_all_color_scale(), set_alpha_scale(), NodePathCollection::set_attrib(), set_audio_volume(), set_clip_plane(), set_clip_plane_off(), set_color_scale(), NodePathCollection::set_color_scale(), set_light(), set_light_off(), set_shader_auto(), set_tex_gen(), NodePathCollection::set_texture(), and NodePathCollection::set_texture_off().
|
inline |
Definition at line 684 of file nodePath.I.
|
inline |
Returns the relative scale of the referenced node as seen from the other node.
Definition at line 879 of file nodePath.I.
References get_scale().
|
inline |
Definition at line 689 of file nodePath.I.
|
inline |
Definition at line 884 of file nodePath.I.
|
inline |
Definition at line 694 of file nodePath.I.
|
inline |
Definition at line 889 of file nodePath.I.
|
inline |
Retrieves the user-defined value that was previously set on this node for the particular key, if any.
If no value has been previously set, returns the empty string. See also get_net_tag().
Definition at line 2009 of file nodePath.I.
References is_empty(), and node().
|
inline |
Fills the given vector up with the list of tags on this PandaNode.
It is the user's responsibility to ensure that the keys vector is empty before making this call; otherwise, the new files will be appended to it.
Definition at line 2025 of file nodePath.I.
References PandaNode::get_tag_keys(), is_empty(), and node().
RenderAttrib::TexGenMode NodePath::get_tex_gen | ( | TextureStage * | stage | ) | const |
Returns the texture coordinate generation mode for the given stage, or M_off if there is no explicit mode set for the given stage.
Definition at line 3717 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Returns the 3-D HPR set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1710 of file nodePath.I.
References is_empty().
|
inline |
Returns the 3-D HPR set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1493 of file nodePath.I.
References is_empty().
|
inline |
Returns the offset set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1591 of file nodePath.I.
References is_empty().
|
inline |
Returns the offset set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1374 of file nodePath.I.
References is_empty().
|
inline |
Returns the offset set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1698 of file nodePath.I.
References is_empty().
|
inline |
Returns the offset set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1481 of file nodePath.I.
References is_empty().
NodePath NodePath::get_tex_projector_from | ( | TextureStage * | stage | ) | const |
Returns the "from" node associated with the TexProjectorEffect on the indicated stage.
The relative transform between the "from" and the "to" nodes is automatically applied to the texture transform each frame.
Definition at line 3816 of file nodePath.cxx.
References fail(), is_empty(), node(), and not_found().
NodePath NodePath::get_tex_projector_to | ( | TextureStage * | stage | ) | const |
Returns the "to" node associated with the TexProjectorEffect on the indicated stage.
The relative transform between the "from" and the "to" nodes is automatically applied to the texture transform each frame.
Definition at line 3835 of file nodePath.cxx.
References fail(), is_empty(), node(), and not_found().
|
inline |
Returns the rotation set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1603 of file nodePath.I.
References is_empty().
|
inline |
Returns the rotation set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1386 of file nodePath.I.
References is_empty().
|
inline |
Returns the scale set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1614 of file nodePath.I.
References is_empty().
|
inline |
Returns the scale set for the UV's for the given stage on the current node.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1397 of file nodePath.I.
References is_empty().
|
inline |
Returns the scale set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1722 of file nodePath.I.
References is_empty().
|
inline |
Returns the scale set for the UVW's for the given stage on the current node.
This call is appropriate for 3-d texture coordinates.
Definition at line 1505 of file nodePath.I.
References is_empty().
Texture * NodePath::get_texture | ( | ) | const |
Returns the base-level texture that has been set on this particular node, or NULL if no texture has been set.
This is not necessarily the texture that will be applied to the geometry at or below this level, as another texture at a higher or lower level may override.
See also find_texture().
Definition at line 3175 of file nodePath.cxx.
References TextureAttrib::get_texture(), is_empty(), and node().
Referenced by has_texture().
Texture * NodePath::get_texture | ( | TextureStage * | stage | ) | const |
Returns the texture that has been set on the indicated stage for this particular node, or NULL if no texture has been set for this stage.
Definition at line 3192 of file nodePath.cxx.
References TextureAttrib::get_on_texture, is_empty(), and node().
const SamplerState & NodePath::get_texture_sampler | ( | ) | const |
Returns the sampler state that has been given for the base-level texture that has been set on this particular node.
If no sampler state was given, this returns the texture's default sampler settings.
It is an error to call this if there is no base-level texture applied to this particular node.
Definition at line 3229 of file nodePath.cxx.
References TextureStage::get_default, and get_texture_sampler().
Referenced by get_texture_sampler().
const SamplerState & NodePath::get_texture_sampler | ( | TextureStage * | stage | ) | const |
Returns the sampler state that has been given for the indicated texture stage that has been set on this particular node.
If no sampler state was given, this returns the texture's default sampler settings.
It is an error to call this if there is no texture set for this stage on this particular node.
Definition at line 3242 of file nodePath.cxx.
References SamplerState::get_default(), TextureAttrib::get_on_sampler, is_empty(), and node().
NodePath 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 empty.
Definition at line 207 of file nodePath.cxx.
References fail(), NodePathComponent::get_next(), Thread::get_pipeline_stage, is_empty(), and NodePathComponent::is_top_node().
Referenced by NonlinearImager::add_screen(), NonlinearImager::add_viewer(), BulletVehicle::do_sync_b2p(), get_top_node(), PT(), GraphicsEngine::render_frame(), NonlinearImager::set_viewer_camera(), and PhysxActor::update_transform().
|
inline |
Returns the top node of the path, or NULL if the path is empty.
This requires iterating through the path.
Definition at line 214 of file nodePath.I.
References get_top(), is_empty(), and node().
const TransformState * NodePath::get_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const |
Returns the complete transform object set on this node.
Definition at line 793 of file nodePath.cxx.
References is_empty(), and node().
Referenced by SpeedTreeNode::add_instances(), DXGraphicsStateGuardian9::bind_light(), DXGraphicsStateGuardian9::bind_light(), DXGraphicsStateGuardian9::bind_light(), calc_tight_bounds(), CPT(), SpeedTreeNode::cull_callback(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), GraphicsEngine::do_cull(), GraphicsStateGuardian::fetch_specified_member(), GraphicsStateGuardian::fetch_specified_part(), CollisionEntry::get_all(), CollisionEntry::get_all_contact_info(), CollisionEntry::get_contact_normal(), CollisionEntry::get_contact_pos(), get_hpr(), get_hpr(), CollisionEntry::get_interior_point(), get_mat(), get_pos(), get_pos(), get_pos_delta(), get_pos_delta(), get_quat(), get_quat(), get_relative_point(), get_relative_vector(), get_scale(), get_scale(), get_shear(), get_shear(), CollisionEntry::get_surface_normal(), CollisionEntry::get_surface_point(), heads_up(), look_at(), CollisionLevelStateBase::prepare_collider(), PortalClipper::prepare_portal(), CConstrainTransformInterval::priv_step(), CLerpNodePathInterval::priv_step(), PT(), PT(), ProjectionScreen::recompute_if_stale(), set_fluid_pos(), set_fluid_pos(), set_hpr(), set_hpr(), set_hpr_scale(), set_hpr_scale(), set_pos(), set_pos(), set_pos_hpr(), set_pos_hpr(), set_pos_quat(), set_pos_quat(), set_quat(), set_quat(), set_quat_scale(), set_quat_scale(), set_scale(), set_scale(), PipeOcclusionCullTraverser::set_scene(), set_shear(), set_shear(), set_sx(), set_sy(), set_sz(), CullTraverser::traverse(), PSSMCameraRig::update(), and wrt_reparent_to().
TransparencyAttrib::Mode NodePath::get_transparency | ( | ) | const |
Returns the transparent rendering that has been specifically set on this node via set_transparency(), or M_none if nontransparent rendering has been specifically set, or if nothing has been specifically set.
See also has_transparency(). This does not necessarily imply that the geometry will or will not be rendered transparent, as there may be other nodes that override.
Definition at line 4962 of file nodePath.cxx.
References TransparencyAttrib::get_mode, is_empty(), and node().
bool NodePath::get_two_sided | ( | ) | const |
Returns true if two-sided rendering has been specifically set on this node via set_two_sided(), or false if one-sided rendering has been specifically set, or if nothing has been specifically set.
See also has_two_sided(). This does not necessarily imply that the geometry will or will not be rendered two-sided, as there may be other nodes that override.
Definition at line 4560 of file nodePath.cxx.
References CullFaceAttrib::get_actual_mode, is_empty(), and node().
|
inline |
Definition at line 631 of file nodePath.I.
|
inline |
Definition at line 821 of file nodePath.I.
|
inline |
Definition at line 636 of file nodePath.I.
|
inline |
Definition at line 826 of file nodePath.I.
|
inline |
Definition at line 641 of file nodePath.I.
|
inline |
Definition at line 831 of file nodePath.I.
bool NodePath::has_antialias | ( | ) | const |
Returns true if an antialias setting has been explicitly mode on this particular node via set_antialias().
If this returns true, then get_antialias() may be called to determine what the setting was.
Definition at line 5065 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not.
Definition at line 468 of file nodePath.I.
References is_empty(), and node().
bool NodePath::has_audio_volume | ( | ) | const |
Returns true if an audio volume has been applied to the referenced node, false otherwise.
It is still possible that volume at this node might have been scaled by an ancestor node.
Definition at line 5093 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_billboard | ( | ) | const |
Returns true if there is any billboard effect on the node.
Definition at line 4883 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_bin | ( | ) | const |
Returns true if the node has been assigned to the a particular rendering bin via set_bin(), false otherwise.
Definition at line 2886 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_clip_plane | ( | const NodePath & | clip_plane | ) | const |
Returns true if the indicated clipping plane has been specifically applied to this particular node.
This means that someone called set_clip_plane() on this node with the indicated clip_plane.
Definition at line 2624 of file nodePath.cxx.
References ClipPlaneAttrib::has_on_plane(), is_empty(), TypedObject::is_of_type(), and node().
bool NodePath::has_clip_plane_off | ( | ) | const |
Returns true if all clipping planes have been specifically disabled on this particular node.
This means that someone called set_clip_plane_off() on this node with no parameters.
Definition at line 2646 of file nodePath.cxx.
References ClipPlaneAttrib::has_all_off(), is_empty(), and node().
bool NodePath::has_clip_plane_off | ( | const NodePath & | clip_plane | ) | const |
Returns true if the indicated clipping plane has been specifically disabled on this particular node.
This means that someone called set_clip_plane_off() on this node with the indicated clip_plane.
Definition at line 2665 of file nodePath.cxx.
References ClipPlaneAttrib::has_off_plane(), is_empty(), TypedObject::is_of_type(), and node().
bool NodePath::has_color | ( | ) | const |
Returns true if a color has been applied to the given node, false otherwise.
Definition at line 2061 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_color_scale | ( | ) | const |
Returns true if a color scale has been applied to the referenced node, false otherwise.
It is still possible that color at this node might have been scaled by an ancestor node.
Definition at line 2094 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_compass | ( | ) | const |
Returns true if there is any compass effect on the node.
Definition at line 4912 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_depth_offset | ( | ) | const |
Returns true if a depth-offset adjustment has been explicitly set on this particular node via set_depth_offset().
If this returns true, then get_depth_offset() may be called to determine which has been set.
Definition at line 4718 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_depth_test | ( | ) | const |
Returns true if a depth-test adjustment has been explicitly set on this particular node via set_depth_test().
If this returns true, then get_depth_test() may be called to determine which has been set.
Definition at line 4605 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_depth_write | ( | ) | const |
Returns true if a depth-write adjustment has been explicitly set on this particular node via set_depth_write().
If this returns true, then get_depth_write() may be called to determine which has been set.
Definition at line 4662 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Returns true if there is a render effect of the indicated type defined on this node, or false if there is not.
Definition at line 509 of file nodePath.I.
References is_empty(), and node().
Referenced by has_scissor().
bool NodePath::has_fog | ( | ) | const |
Returns true if a fog has been applied to this particular node via set_fog(), false otherwise.
This is not the same thing as asking whether the geometry at this node will be rendered with fog, as there may be a fog in effect from a higher or lower level.
Definition at line 4307 of file nodePath.cxx.
References is_empty(), FogAttrib::is_off(), and node().
bool NodePath::has_fog_off | ( | ) | const |
Returns true if a fog has been specifically disabled on this particular node via set_fog_off(), false otherwise.
This is not the same thing as asking whether the geometry at this node will be rendered unfogged, as there may be a fog in effect from a higher or lower level.
Definition at line 4326 of file nodePath.cxx.
References is_empty(), FogAttrib::is_off(), and node().
bool NodePath::has_light | ( | const NodePath & | light | ) | const |
Returns true if the indicated Light or PolylightNode has been specifically enabled on this particular node.
This means that someone called set_light() on this node with the indicated light.
Definition at line 2425 of file nodePath.cxx.
References PandaNode::as_light(), LightAttrib::has_on_light(), is_empty(), TypedObject::is_of_type(), and node().
bool NodePath::has_light_off | ( | ) | const |
Returns true if all Lights have been specifically disabled on this particular node.
This means that someone called set_light_off() on this node with no parameters.
Definition at line 2459 of file nodePath.cxx.
References LightAttrib::has_all_off(), is_empty(), and node().
bool NodePath::has_light_off | ( | const NodePath & | light | ) | const |
Returns true if the indicated Light has been specifically disabled on this particular node.
This means that someone called set_light_off() on this node with the indicated light.
This interface does not support PolylightNodes, which cannot be turned off at a lower level.
Definition at line 2481 of file nodePath.cxx.
References PandaNode::as_light(), LightAttrib::has_off_light(), is_empty(), and node().
bool NodePath::has_logic_op | ( | ) | const |
Returns true if a logical operation has been explicitly set on this particular node via set_logic_op().
If this returns true, then get_logic_op() may be called to determine whether a logical operation has been explicitly disabled for this node or set to particular operation.
Definition at line 5010 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Returns true if a non-identity transform matrix has been applied to the referenced node, false otherwise.
Definition at line 765 of file nodePath.I.
References is_empty(), and node().
bool NodePath::has_material | ( | ) | const |
Returns true if a material has been applied to this particular node via set_material(), false otherwise.
Definition at line 4214 of file nodePath.cxx.
References is_empty(), MaterialAttrib::is_off(), and node().
bool NodePath::has_occluder | ( | const NodePath & | occluder | ) | const |
Returns true if the indicated occluder has been specifically applied to this particular node.
This means that someone called set_occluder() on this node with the indicated occluder.
Definition at line 2750 of file nodePath.cxx.
References OccluderEffect::has_on_occluder(), is_empty(), TypedObject::is_of_type(), and node().
bool NodePath::has_render_mode | ( | ) | const |
Returns true if a render mode has been explicitly set on this particular node via set_render_mode() (or set_render_mode_wireframe() or set_render_mode_filled()), false otherwise.
Definition at line 4455 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_scissor | ( | ) | const |
Returns true if a scissor region was defined at this node by a previous call to set_scissor().
This does not check for scissor regions inherited from a parent class. It also does not check for the presence of a low- level ScissorAttrib, which is different from the ScissorEffect added by set_scissor.
Definition at line 2844 of file nodePath.cxx.
References has_effect().
|
inline |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.
See also has_net_tag().
Definition at line 2036 of file nodePath.I.
References is_empty(), and node().
Referenced by find_net_tag().
bool NodePath::has_tex_gen | ( | TextureStage * | stage | ) | const |
Returns true if there is a mode for automatic texture coordinate generation on the current node for the given stage.
Definition at line 3699 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_tex_projector | ( | TextureStage * | stage | ) | const |
Returns true if this node has a TexProjectorEffect for the indicated stage, false otherwise.
Definition at line 3797 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_tex_transform | ( | TextureStage * | stage | ) | const |
Returns true if there is an explicit texture matrix on the current node for the given stage.
Definition at line 3521 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Returns true if there are at least some vertices at this node and below that use the named texture coordinate set, false otherwise.
Pass the empty string for the default texture coordinate set.
Definition at line 1743 of file nodePath.I.
References has_vertex_column().
bool NodePath::has_texture | ( | ) | const |
Returns true if a texture has been applied to this particular node via set_texture(), false otherwise.
This is not the same thing as asking whether the geometry at this node will be rendered with texturing, as there may be a texture in effect from a higher or lower level.
Definition at line 3103 of file nodePath.cxx.
References get_texture().
bool NodePath::has_texture | ( | TextureStage * | stage | ) | const |
Returns true if texturing has been specifically enabled on this particular node for the indicated stage.
This means that someone called set_texture() on this node with the indicated stage name, or the stage_name is the default stage_name, and someone called set_texture() on this node.
Definition at line 3114 of file nodePath.cxx.
References TextureAttrib::has_on_stage, is_empty(), and node().
bool NodePath::has_texture_off | ( | ) | const |
Returns true if texturing has been specifically disabled on this particular node via set_texture_off(), false otherwise.
This is not the same thing as asking whether the geometry at this node will be rendered untextured, as there may be a texture in effect from a higher or lower level.
Definition at line 3134 of file nodePath.cxx.
References TextureAttrib::has_all_off(), is_empty(), and node().
bool NodePath::has_texture_off | ( | TextureStage * | stage | ) | const |
Returns true if texturing has been specifically disabled on this particular node for the indicated stage.
This means that someone called set_texture_off() on this node with the indicated stage name, or that someone called set_texture_off() on this node to remove all stages.
Definition at line 3153 of file nodePath.cxx.
References TextureAttrib::has_off_stage(), is_empty(), and node().
bool NodePath::has_transparency | ( | ) | const |
Returns true if a transparent-rendering adjustment has been explicitly set on this particular node via set_transparency().
If this returns true, then get_transparency() may be called to determine whether transparency has been explicitly enabled or explicitly disabled for this node.
Definition at line 4948 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::has_two_sided | ( | ) | const |
Returns true if a two-sided adjustment has been explicitly set on this particular node via set_two_sided().
If this returns true, then get_two_sided() may be called to determine which has been set.
Definition at line 4547 of file nodePath.cxx.
References is_empty(), and node().
bool NodePath::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 the indicated vertex data column name, false otherwise.
This is particularly useful for testing whether a particular model has a given texture coordinate set (but see has_texcoord()).
Definition at line 3870 of file nodePath.cxx.
References is_empty(), and node().
Referenced by has_texcoord().
void NodePath::heads_up | ( | const LPoint3 & | point, |
const LVector3 & | up = LVector3::up() ) |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
Definition at line 1383 of file nodePath.cxx.
References get_pos(), heads_up(), is_empty(), and set_quat().
void NodePath::heads_up | ( | const NodePath & | other, |
const LPoint3 & | point = LPoint3(0.0, 0.0, 0.0), | ||
const LVector3 & | up = LVector3::up() ) |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
Definition at line 1997 of file nodePath.cxx.
References TransformState::get_mat, get_parent, get_pos(), get_transform(), heads_up(), is_empty(), and set_quat().
|
inline |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
Definition at line 969 of file nodePath.I.
References heads_up().
|
inline |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
Definition at line 797 of file nodePath.I.
References heads_up().
Referenced by do_billboard_axis(), heads_up(), heads_up(), heads_up(), and heads_up().
|
inline |
Makes the referenced node (and the entire subgraph below this node) invisible to all cameras.
It remains part of the scene graph, its bounding volume still contributes to its parent's bounding volume, and it will still be involved in collision tests.
To undo this, call show().
Definition at line 1852 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
Referenced by PandaFramework::hide_collision_solids(), HideInterval::priv_instant(), ShowInterval::priv_reverse_instant(), and NonlinearImager::set_screen_active().
|
inline |
Makes the referenced node invisible just to the cameras whose camera_mask shares the indicated bits.
This will also hide any nodes below this node in the scene graph, including those nodes for which show() has been called, but it will not hide descendent nodes for which show_through() has been called.
Definition at line 1866 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
void NodePath::hide_bounds | ( | ) |
Stops the rendering of the bounding volume begun with show_bounds().
Definition at line 5456 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), and node().
Referenced by PandaFramework::clear_highlight().
|
inlinestatic |
Definition at line 1050 of file nodePath.h.
NodePath NodePath::instance_to | ( | const NodePath & | other, |
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) const |
Adds the referenced node of the NodePath as a child of the referenced node of the indicated other NodePath.
Any other parent-child relations of the node are unchanged; in particular, the node is not removed from its existing parent, if any.
If the node already had an existing parent, this method will create a new instance of the node within the scene graph.
This does not change the NodePath itself, but does return a new NodePath that reflects the new instance node.
If the destination NodePath is empty, this creates a new instance which is not yet parented to any node. A new instance of this sort cannot easily be differentiated from other similar instances, but it is nevertheless a different instance and it will return a different get_id() value.
If the referenced node is already a child of the indicated NodePath, returns that already-existing instance, unstashing it first if necessary.
Definition at line 473 of file nodePath.cxx.
References fail(), Thread::get_pipeline_stage, is_empty(), is_stashed(), node(), unstash(), and verify_complete().
Referenced by MayaPview::doIt(), PGItem::instance_to_state_def(), and instance_under_node().
NodePath NodePath::instance_under_node | ( | const NodePath & | other, |
const std::string & | name, | ||
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) const |
Behaves like instance_to(), but implicitly creates a new node to instance the geometry under, and returns a NodePath to that new node.
This allows the programmer to set a unique state and/or transform on this instance.
Definition at line 520 of file nodePath.cxx.
References attach_new_node(), instance_to(), is_empty(), and remove_node().
|
inline |
Returns true if the node represented by this NodePath is a parent or other ancestor of the other NodePath, or false if it is not.
Definition at line 293 of file nodePath.I.
|
inline |
Returns true if the NodePath contains no nodes.
Definition at line 187 of file nodePath.I.
Referenced by NodePath(), TagStateManager::TagStateManager(), WorkingNodePath::WorkingNodePath(), LightAttrib::~LightAttrib(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), CollisionHandlerPhysical::add_collider(), SpriteParticleRenderer::add_from_node(), SpeedTreeNode::add_from_stf(), MouseWatcher::add_group(), SpeedTreeNode::add_instances(), AttribNodeRegistry::add_node(), NonlinearImager::add_screen(), NonlinearImager::add_viewer(), adjust_all_priorities(), WindowFramework::adjust_dimensions(), CompassEffect::adjust_transform(), apply_texture_colors(), PhysxActor::attach_node_path(), calc_tight_bounds(), clear_antialias(), clear_attrib(), clear_audio_volume(), clear_billboard(), clear_bin(), clear_clip_plane(), clear_clip_plane(), clear_color(), clear_color_scale(), clear_compass(), clear_depth_offset(), clear_depth_test(), clear_depth_write(), clear_effect(), clear_effects(), clear_fog(), PandaFramework::clear_highlight(), clear_light(), clear_light(), clear_logic_op(), clear_mat(), clear_material(), clear_model_nodes(), clear_occluder(), clear_occluder(), clear_render_mode(), clear_tag(), clear_tex_gen(), clear_tex_gen(), clear_tex_projector(), clear_tex_projector(), clear_tex_transform(), clear_tex_transform(), clear_texture(), clear_texture(), clear_transparency(), clear_two_sided(), compose_color_scale(), copy_to(), count_num_descendants(), CPT(), CPT(), CPT(), PortalNode::cull_callback(), SpeedTreeNode::cull_callback(), detach_node(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), GraphicsStateGuardian::do_issue_light(), encode_to_bam_stream(), PandaFramework::event_A(), PandaFramework::event_B(), PandaFramework::event_c(), PandaFramework::event_C(), PandaFramework::event_L(), PandaFramework::event_question(), GraphicsStateGuardian::fetch_specified_member(), GraphicsStateGuardian::fetch_specified_part(), SpeedTreeNode::InstanceList::fillin(), find(), find_all_matches(), find_all_materials(), find_all_materials(), find_all_paths_to(), find_all_texcoords(), find_all_texcoords(), find_all_texture_stages(), find_all_texture_stages(), find_all_textures(), find_all_textures(), find_all_textures(), find_all_vertex_columns(), find_all_vertex_columns(), find_material(), find_net_tag(), AttribNodeRegistry::find_node(), find_path_to(), find_texture(), find_texture(), find_texture_stage(), flatten_light(), flatten_medium(), flatten_strong(), get_antialias(), WindowFramework::get_aspect_2d(), get_attrib(), get_bin_draw_order(), get_bin_name(), WindowFramework::get_camera_group(), get_collide_mask(), get_color(), get_color_scale(), get_depth_offset(), get_depth_test(), get_depth_write(), get_effect(), get_effects(), get_fog(), get_hpr(), get_hpr(), get_instance_count(), get_key(), get_logic_op(), get_mat(), PandaFramework::get_models(), WindowFramework::get_mouse(), get_num_children(), WindowFramework::get_pixel_2d(), get_pos(), get_pos(), get_pos_delta(), get_pos_delta(), get_prev_transform(), get_quat(), get_quat(), WindowFramework::get_render(), WindowFramework::get_render_2d(), get_render_mode(), get_render_mode_perspective(), get_render_mode_thickness(), get_scale(), get_scale(), get_shear(), get_shear(), get_state(), get_tag(), get_tag_keys(), get_tex_gen(), get_tex_hpr(), get_tex_hpr(), get_tex_offset(), get_tex_offset(), get_tex_pos(), get_tex_pos(), get_tex_projector_from(), get_tex_projector_to(), get_tex_rotate(), get_tex_rotate(), get_tex_scale(), get_tex_scale(), get_tex_scale_3d(), get_tex_scale_3d(), get_texture(), get_texture(), get_texture_sampler(), get_top(), get_top_node(), get_transform(), get_transparency(), get_two_sided(), NurbsSurfaceEvaluator::get_vertex(), has_antialias(), has_attrib(), has_audio_volume(), has_billboard(), has_bin(), has_clip_plane(), has_clip_plane_off(), has_clip_plane_off(), has_color(), has_color_scale(), has_compass(), has_depth_offset(), has_depth_test(), has_depth_write(), has_effect(), has_fog(), has_fog_off(), PandaFramework::has_highlight(), has_light(), has_light_off(), has_light_off(), has_logic_op(), has_mat(), has_material(), has_occluder(), has_render_mode(), has_tag(), has_tex_gen(), has_tex_projector(), has_tex_transform(), has_texture(), has_texture_off(), has_texture_off(), has_transparency(), has_two_sided(), has_vertex_column(), heads_up(), heads_up(), hide(), hide(), hide_bounds(), ShadowManager::init(), CDistributedSmoothNodeBase::initialize(), instance_to(), PGItem::instance_to_state_def(), instance_under_node(), is_hidden(), is_stashed(), list_tags(), WindowFramework::load_models(), look_at(), look_at(), AttribNodeRegistry::lookup_node(), ls(), node(), premunge_scene(), prepare_scene(), CConstrainHprInterval::priv_step(), CConstrainPosHprInterval::priv_step(), CConstrainPosInterval::priv_step(), CConstrainTransformInterval::priv_step(), CLerpNodePathInterval::priv_step(), project_texture(), PT(), PT(), PT(), PT(), PT(), PT(), ProjectionScreen::recompute_if_stale(), MouseWatcher::remove_group(), AttribNodeRegistry::remove_node(), remove_node(), GraphicsEngine::render_frame(), EggLoader::reparent_decals(), reparent_to(), PSSMCameraRig::reparent_to(), MouseWatcher::replace_group(), replace_texture(), reverse_ls(), set_all_color_scale(), set_alpha_scale(), set_antialias(), set_audio_volume(), set_audio_volume_off(), set_billboard_axis(), set_billboard_point_eye(), set_billboard_point_world(), set_bin(), set_clip_plane(), set_clip_plane_off(), set_clip_plane_off(), set_collide_mask(), set_color(), set_color_off(), set_color_scale(), set_color_scale_off(), set_compass(), set_depth_offset(), set_depth_test(), set_depth_write(), set_effect(), set_effects(), set_fluid_pos(), set_fluid_pos(), set_fog(), set_fog_off(), PGItem::set_frame_style(), SpriteParticleRenderer::set_from_node(), PandaFramework::set_highlight(), set_hpr(), set_hpr(), set_hpr_scale(), set_hpr_scale(), set_instance_count(), set_light(), set_light_off(), set_light_off(), PhysxController::set_local_speed(), set_logic_op(), set_mat(), set_mat(), set_material(), set_material_off(), set_occluder(), set_pos(), set_pos(), set_pos_hpr(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_pos_quat_scale_shear(), ProjectionScreen::set_projector(), set_quat(), set_quat(), set_quat_scale(), set_quat_scale(), set_render_mode(), set_render_mode_filled(), set_render_mode_filled_wireframe(), set_render_mode_perspective(), set_render_mode_thickness(), set_render_mode_wireframe(), set_scale(), set_scale(), ShadowManager::set_scene(), set_shader_auto(), set_shear(), set_shear(), NonlinearImager::set_source_camera(), set_state(), set_sx(), set_sy(), set_sz(), set_tag(), set_tex_gen(), set_tex_hpr(), set_tex_hpr(), set_tex_offset(), set_tex_offset(), set_tex_pos(), set_tex_pos(), set_tex_projector(), set_tex_rotate(), set_tex_rotate(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_transform(), set_texture(), set_texture(), set_texture(), set_texture(), set_texture_off(), set_texture_off(), set_transform(), set_transparency(), set_two_sided(), NonlinearImager::set_viewer_camera(), set_x(), set_y(), set_z(), show(), show(), show_bounds(), show_through(), show_through(), show_tight_bounds(), stash(), stash_to(), unify_texture_stages(), unstash(), PSSMCameraRig::update(), PhysxActor::update_transform(), verify_complete(), write_bam_file(), write_bam_stream(), ParamNodePath::write_datagram(), write_datagram(), and wrt_reparent_to().
|
inline |
Returns true if the referenced node is hidden from the indicated camera(s) either directly, or because some ancestor is hidden.
Definition at line 1877 of file nodePath.I.
References get_hidden_ancestor(), and is_empty().
Referenced by PandaFramework::hide_collision_solids().
|
inline |
Returns true if the node represented by this NodePath is parented within the same graph as that of the other NodePath.
This is essentially the same thing as asking whether get_top() of both NodePaths is the same (e.g., both "render").
Definition at line 274 of file nodePath.I.
Referenced by NonlinearImager::add_screen(), NonlinearImager::add_viewer(), CConstrainHprInterval::priv_step(), CConstrainPosHprInterval::priv_step(), CConstrainPosInterval::priv_step(), CConstrainTransformInterval::priv_step(), and NonlinearImager::set_viewer_camera().
|
inline |
Returns true if the NodePath contains exactly one node.
Definition at line 195 of file nodePath.I.
References Thread::get_pipeline_stage.
Referenced by detach_node(), remove_node(), stash(), and unstash().
|
inline |
Returns true if the referenced node is stashed either directly, or because some ancestor is stashed.
Definition at line 1886 of file nodePath.I.
References get_stashed_ancestor(), and is_empty().
Referenced by instance_to().
|
inline |
Lists the tags to the nout stream, one per line.
See PandaNode::list_tags() for a variant that allows you to specify the output stream.
Definition at line 2081 of file nodePath.I.
References is_empty(), PandaNode::list_tags(), and node().
void NodePath::look_at | ( | const LPoint3 & | point, |
const LVector3 & | up = LVector3::up() ) |
Sets the hpr on this NodePath so that it rotates to face the indicated point in space.
Definition at line 1368 of file nodePath.cxx.
References get_pos(), is_empty(), look_at(), and set_quat().
void NodePath::look_at | ( | const NodePath & | other, |
const LPoint3 & | point = LPoint3(0.0, 0.0, 0.0), | ||
const LVector3 & | up = LVector3::up() ) |
Sets the transform on this NodePath so that it rotates to face the indicated point in space, which is relative to the other NodePath.
Definition at line 1979 of file nodePath.cxx.
References TransformState::get_mat, get_parent, get_pos(), get_transform(), is_empty(), look_at(), and set_quat().
|
inline |
Sets the hpr on this NodePath so that it rotates to face the indicated point in space, which is relative to the other NodePath.
Definition at line 960 of file nodePath.I.
References look_at().
|
inline |
Sets the transform on this NodePath so that it rotates to face the indicated point in space.
This will overwrite any previously existing scale on the node, although it will preserve any translation.
Definition at line 788 of file nodePath.I.
References look_at().
Referenced by do_billboard_point_eye(), do_billboard_point_world(), look_at(), look_at(), look_at(), look_at(), GraphicsOutput::make_cube_map(), and AICharacter::update().
|
inline |
Lists the hierarchy at and below the referenced node.
Definition at line 398 of file nodePath.I.
References ls().
Referenced by PandaFramework::event_L(), ls(), and NodePathCollection::ls().
|
inline |
Lists the hierarchy at and below the referenced node.
Definition at line 406 of file nodePath.I.
References is_empty(), and node().
|
inline |
Returns the referenced node of the path.
Definition at line 226 of file nodePath.I.
References is_empty().
Referenced by NodePath(), StaticTextFont::StaticTextFont(), TagStateManager::TagStateManager(), WorkingNodePath::WorkingNodePath(), LightAttrib::~LightAttrib(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), CollisionHandlerPhysical::add_collider(), SpeedTreeNode::add_from_stf(), SpeedTreeNode::add_instances(), NonlinearImager::add_screen(), NonlinearImager::add_viewer(), adjust_all_priorities(), any_path(), CollisionBox::apply_clip_plane(), apply_texture_colors(), attach_new_node(), calc_tight_bounds(), TagStateManager::cleanup_states(), clear_antialias(), clear_attrib(), clear_audio_volume(), clear_billboard(), clear_bin(), clear_clip_plane(), clear_clip_plane(), clear_color(), clear_color_scale(), clear_compass(), clear_depth_offset(), clear_depth_test(), clear_depth_write(), clear_effect(), clear_effects(), clear_fog(), clear_light(), clear_light(), clear_logic_op(), clear_mat(), clear_material(), clear_model_nodes(), clear_occluder(), clear_occluder(), MouseWatcherBase::clear_regions(), clear_render_mode(), clear_tag(), clear_tex_gen(), clear_tex_gen(), clear_tex_projector(), clear_tex_projector(), clear_tex_transform(), clear_tex_transform(), clear_texture(), clear_texture(), clear_transparency(), clear_two_sided(), complete_pointers(), compose_color_scale(), copy_to(), PGEntry::cull_callback(), SpeedTreeNode::cull_callback(), decode_from_bam_stream(), detach_node(), GraphicsStateGuardian::do_issue_light(), encode_to_bam_stream(), PandaFramework::event_A(), PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), GraphicsStateGuardian::fetch_specified_member(), GraphicsStateGuardian::fetch_specified_part(), SpeedTreeNode::InstanceList::fillin(), find_all_materials(), find_all_materials(), find_all_paths_to(), find_all_texcoords(), find_all_texcoords(), find_all_texture_stages(), find_all_texture_stages(), find_all_textures(), find_all_textures(), find_all_textures(), find_all_vertex_columns(), find_all_vertex_columns(), find_material(), find_path_to(), find_texture(), find_texture(), find_texture_stage(), flatten_light(), flatten_medium(), flatten_strong(), GeoMipTerrain::generate(), MeshDrawer::geometry(), get_antialias(), WindowFramework::get_aspect_2d(), get_attrib(), get_audio_volume(), get_bin_draw_order(), get_bin_name(), get_collide_mask(), get_color(), get_color_scale(), get_depth_offset(), get_depth_test(), get_depth_write(), get_effect(), get_effects(), get_fog(), get_hidden_ancestor(), get_instance_count(), get_logic_op(), get_mat(), get_prev_transform(), WindowFramework::get_render(), get_render_mode(), get_render_mode_perspective(), get_render_mode_thickness(), get_stashed_ancestor(), get_state(), get_tag(), get_tag_keys(), get_tex_gen(), get_tex_projector_from(), get_tex_projector_to(), get_texture(), get_texture(), GraphicsOutput::get_texture_card(), get_texture_sampler(), get_top_node(), get_transform(), get_transparency(), get_two_sided(), has_antialias(), has_attrib(), has_audio_volume(), has_billboard(), has_bin(), has_clip_plane(), has_clip_plane_off(), has_clip_plane_off(), has_color(), has_color_scale(), has_compass(), has_depth_offset(), has_depth_test(), has_depth_write(), has_effect(), has_fog(), has_fog_off(), has_light(), has_light_off(), has_light_off(), has_logic_op(), has_mat(), has_material(), has_occluder(), has_render_mode(), has_tag(), has_tex_gen(), has_tex_projector(), has_tex_transform(), has_texture(), has_texture_off(), has_texture_off(), has_transparency(), has_two_sided(), has_vertex_column(), hide(), hide(), hide_bounds(), PandaFramework::hide_collision_solids(), instance_to(), MeshDrawer::link_segment(), list_tags(), ls(), GraphicsOutput::make_cube_map(), premunge_scene(), PortalClipper::prepare_portal(), prepare_scene(), project_texture(), PT(), PT(), PT(), PT(), PT(), PT(), ProjectionScreen::recompute_if_stale(), remove_node(), GraphicsEngine::render_frame(), EggLoader::reparent_decals(), reparent_to(), replace_texture(), reverse_ls(), MultitexReducer::scan(), MultitexReducer::scan(), set_all_color_scale(), set_alpha_scale(), set_antialias(), set_audio_volume(), set_audio_volume_off(), set_billboard_axis(), set_billboard_point_eye(), set_billboard_point_world(), set_bin(), set_clip_plane(), set_clip_plane_off(), set_clip_plane_off(), set_collide_mask(), set_color(), set_color_off(), set_color_scale(), set_color_scale_off(), set_compass(), set_depth_offset(), set_depth_test(), set_depth_write(), set_effect(), set_effects(), set_fog(), set_fog_off(), PhysxCcdSkeletonDesc::set_from_node_path(), PhysxClothMeshDesc::set_from_node_path(), PhysxConvexMeshDesc::set_from_node_path(), PhysxTriangleMeshDesc::set_from_node_path(), set_instance_count(), set_light(), set_light_off(), set_light_off(), set_logic_op(), set_mat(), set_mat(), set_material(), set_material_off(), set_occluder(), WindowFramework::set_one_sided_reverse(), set_pos(), set_pos(), set_pos_hpr(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_pos_quat_scale_shear(), ProjectionScreen::set_projector(), set_render_mode(), set_render_mode_filled(), set_render_mode_filled_wireframe(), set_render_mode_perspective(), set_render_mode_thickness(), set_render_mode_wireframe(), set_shader_auto(), NonlinearImager::set_source_camera(), set_state(), set_tag(), set_tex_gen(), set_tex_projector(), set_tex_transform(), set_texture(), set_texture(), set_texture_off(), set_texture_off(), set_transform(), set_transparency(), set_two_sided(), NonlinearImager::set_viewer_camera(), WindowFramework::set_wireframe(), WindowFramework::setup_trackball(), FrameRateMeter::setup_window(), SceneGraphAnalyzerMeter::setup_window(), show(), show(), show_bounds(), PandaFramework::show_collision_solids(), show_through(), show_through(), show_tight_bounds(), stash_to(), PandaFramework::task_data_loop(), unify_texture_stages(), GeoMipTerrain::update(), PSSMCameraRig::update(), verify_complete(), write_bam_file(), write_bam_stream(), ParamNodePath::write_datagram(), write_datagram(), and wrt_reparent_to().
|
inlinestatic |
Creates a NodePath with the ET_not_found error type set.
Definition at line 128 of file nodePath.I.
Referenced by find(), find_net_tag(), find_path_to(), get_common_ancestor(), get_hidden_ancestor(), get_stashed_ancestor(), get_tex_projector_from(), get_tex_projector_to(), and WindowFramework::load_model().
NodePath::operator bool | ( | ) | const |
Returns true if the NodePath is valid (not empty), or false if it contains no nodes.
Definition at line 122 of file nodePath.cxx.
|
inline |
Returns true if the two paths are not equivalent.
Definition at line 1938 of file nodePath.I.
bool NodePath::operator!= | ( | const WeakNodePath & | other | ) | const |
Returns true if the two paths are not equivalent.
Definition at line 5299 of file nodePath.cxx.
|
inline |
Returns true if this NodePath sorts before the other one, false otherwise.
The sorting order of two nonequivalent NodePaths is consistent but undefined, and is useful only for storing NodePaths in a sorted container like an STL set.
Definition at line 1949 of file nodePath.I.
bool NodePath::operator< | ( | const WeakNodePath & | other | ) | const |
Returns true if this NodePath sorts before the other one, false otherwise.
The sorting order of two nonequivalent NodePaths is consistent but undefined, and is useful only for storing NodePaths in a sorted container like an STL set.
Definition at line 5310 of file nodePath.cxx.
|
inline |
Definition at line 86 of file nodePath.I.
|
inlinenoexcept |
Definition at line 107 of file nodePath.I.
|
inline |
Returns true if the two paths are equivalent; that is, if they contain the same list of nodes in the same order.
Definition at line 1930 of file nodePath.I.
bool NodePath::operator== | ( | const WeakNodePath & | other | ) | const |
Returns true if the two paths are equivalent; that is, if they contain the same list of nodes in the same order.
Definition at line 5291 of file nodePath.cxx.
void NodePath::output | ( | std::ostream & | out | ) | const |
Writes a sensible description of the NodePath to the indicated output stream.
Definition at line 695 of file nodePath.cxx.
void NodePath::premunge_scene | ( | GraphicsStateGuardianBase * | gsg = nullptr | ) |
Walks through the scene graph beginning at the bottom node, and internally adjusts any GeomVertexFormats for optimal rendering on the indicated GSG.
If this step is not done prior to rendering, the formats will be optimized at render time instead, for a small cost.
It is not normally necessary to do this on a model loaded directly from disk, since the loader will do this by default.
Definition at line 5399 of file nodePath.cxx.
References get_parent, has_parent, is_empty(), node(), and SceneGraphReducer::premunge().
void NodePath::prepare_scene | ( | GraphicsStateGuardianBase * | gsg | ) |
Walks through the scene graph beginning at the bottom node, and does whatever initialization is required to render the scene properly with the indicated GSG.
It is not strictly necessary to call this, since the GSG will initialize itself when the scene is rendered, but this may take some of the overhead away from that process.
In particular, this will ensure that textures and vertex buffers within the scene are loaded into graphics memory.
Definition at line 5422 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::project_texture | ( | TextureStage * | stage, |
Texture * | tex, | ||
const NodePath & | projector ) |
A convenience function to enable projective texturing at this node level and below, using the indicated NodePath (which should contain a LensNode) as the projector.
Definition at line 3854 of file nodePath.cxx.
References NodePath(), is_empty(), TypedObject::is_of_type(), node(), set_tex_projector(), and set_texture().
void NodePath::remove_node | ( | Thread * | current_thread = Thread::get_current_thread() | ) |
Disconnects the referenced node from the scene graph.
This will also delete the node if there are no other pointers to it.
Normally, this should be called only when you are really done with the node. If you want to remove a node from the scene graph but keep it around for later, you should probably use detach_node() instead.
In practice, the only difference between remove_node() and detach_node() is that remove_node() also resets the NodePath to empty, which will cause the node to be deleted immediately if there are no other references. On the other hand, detach_node() leaves the NodePath referencing the node, which will keep at least one reference to the node for as long as the NodePath exists.
Definition at line 626 of file nodePath.cxx.
References get_key(), Thread::get_pipeline_stage, is_empty(), is_singleton(), node(), removed(), and PandaNode::reset_prev_transform().
Referenced by MeshDrawer::~MeshDrawer(), MeshDrawer2D::~MeshDrawer2D(), ParticleSystem::~ParticleSystem(), PGEntry::clear_cursor_def(), MayaPview::doIt(), PandaFramework::event_question(), and instance_under_node().
|
inlinestatic |
Creates a NodePath with the ET_removed error type set.
Definition at line 138 of file nodePath.I.
Referenced by remove_node().
void NodePath::reparent_to | ( | const NodePath & | other, |
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) |
Removes the referenced node of the NodePath from its current parent and attaches it to the referenced node of the indicated NodePath.
If the destination NodePath is empty, this is the same thing as detach_node().
If the referenced node is already a child of the indicated NodePath (via some other instance), this operation fails and leaves the NodePath detached.
Definition at line 393 of file nodePath.cxx.
References Thread::get_pipeline_stage, is_empty(), node(), PandaNode::reset_prev_transform(), and verify_complete().
Referenced by ParticleSystem::ParticleSystem(), PandaFramework::event_f9(), PandaFramework::event_question(), PfmTrans::process_pfm(), EggLoader::reparent_decals(), and wrt_reparent_to().
Recursively searches the scene graph for references to the given texture, and replaces them with the new texture.
As of Panda3D 1.10.13, new_tex may be null to remove the texture.
Definition at line 3213 of file nodePath.cxx.
References is_empty(), and node().
|
inline |
Lists the hierarchy at and above the referenced node.
Definition at line 418 of file nodePath.I.
References reverse_ls().
Referenced by reverse_ls().
int NodePath::reverse_ls | ( | std::ostream & | out, |
int | indent_level = 0 ) const |
Lists the hierarchy at and above the referenced node.
Definition at line 679 of file nodePath.cxx.
References get_parent, has_parent, is_empty(), and node().
void NodePath::set_all_color_scale | ( | PN_stdfloat | scale, |
int | priority = 0 ) |
Scales all the color components of the object by the same amount, darkening the object, without (much) affecting alpha.
Note that any priority specified will also apply to the alpha scale.
Definition at line 2213 of file nodePath.cxx.
References ColorScaleAttrib::get_scale, get_state(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_alpha_scale | ( | PN_stdfloat | scale, |
int | priority = 0 ) |
Sets the alpha scale component of the transform without (much) affecting the color scale.
Note that any priority specified will also apply to the color scale.
Definition at line 2187 of file nodePath.cxx.
References ColorScaleAttrib::get_scale, get_state(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_antialias | ( | unsigned short | mode, |
int | priority = 0 ) |
Specifies the antialiasing type that should be applied at this node and below.
See AntialiasAttrib.
Definition at line 5043 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_audio_volume | ( | PN_stdfloat | volume, |
int | priority = 0 ) |
Sets the audio volume component of the transform.
Definition at line 5113 of file nodePath.cxx.
References get_state(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_audio_volume_off | ( | int | priority = 0 | ) |
Disables any audio volume attribute inherited from above.
This is not the same thing as clear_audio_volume(), which undoes any previous set_audio_volume() operation on this node; rather, this actively disables any set_audio_volume() that might be inherited from a parent node.
It is legal to specify a new volume on the same node with a subsequent call to set_audio_volume(); this new scale will apply to lower nodes.
Definition at line 5142 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_billboard_axis | ( | const NodePath & | camera, |
PN_stdfloat | offset ) |
Puts a billboard transition on the node such that it will rotate in two dimensions around the up axis, towards a specified "camera" instead of to the viewing camera.
Definition at line 4834 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
|
inline |
Puts a billboard transition on the node such that it will rotate in two dimensions around the up axis.
Definition at line 1752 of file nodePath.I.
References NodePath(), and set_billboard_axis().
Referenced by set_billboard_axis().
void NodePath::set_billboard_point_eye | ( | const NodePath & | camera, |
PN_stdfloat | offset, | ||
bool | fixed_depth = false ) |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the top of the camera, towards a specified "camera" instead of to the viewing camera.
Definition at line 4848 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
|
inline |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the top of the camera.
Definition at line 1762 of file nodePath.I.
References NodePath(), and set_billboard_point_eye().
Referenced by set_billboard_point_eye().
void NodePath::set_billboard_point_world | ( | const NodePath & | camera, |
PN_stdfloat | offset ) |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the sky, towards a specified "camera" instead of to the viewing camera.
Definition at line 4862 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
|
inline |
Puts a billboard transition on the node such that it will rotate in three dimensions about the origin, keeping its up vector oriented to the sky.
Definition at line 1771 of file nodePath.I.
References NodePath(), and set_billboard_point_world().
Referenced by set_billboard_point_world().
void NodePath::set_bin | ( | const std::string & | bin_name, |
int | draw_order, | ||
int | priority = 0 ) |
Assigns the geometry at this level and below to the named rendering bin.
It is the user's responsibility to ensure that such a bin already exists, either via the cull-bin Configrc variable, or by explicitly creating a GeomBin of the appropriate type at runtime.
There are two default bins created when Panda is started: "default" and "fixed". Normally, all geometry is assigned to "default" unless specified otherwise. This bin renders opaque geometry in state-sorted order, followed by transparent geometry sorted back-to-front. If any geometry is assigned to "fixed", this will be rendered following all the geometry in "default", in the order specified by draw_order for each piece of geometry so assigned.
The draw_order parameter is meaningful only for GeomBinFixed type bins, e.g. "fixed". Other kinds of bins ignore it.
Definition at line 2866 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by MultitexReducer::flatten(), FrameRateMeter::setup_window(), and SceneGraphAnalyzerMeter::setup_window().
void NodePath::set_clip_plane | ( | const NodePath & | clip_plane, |
int | priority = 0 ) |
Adds the indicated clipping plane to the list of planes that apply to geometry at this node and below.
The clipping plane itself, a PlaneNode, should be parented into the scene graph elsewhere, to represent the plane's position in space; but until set_clip_plane() is called it will clip no geometry.
Definition at line 2506 of file nodePath.cxx.
References get_state(), is_empty(), TypedObject::is_of_type(), node(), and PandaNode::set_attrib().
void NodePath::set_clip_plane_off | ( | const NodePath & | clip_plane, |
int | priority = 0 ) |
Sets the geometry at this level and below to render without being clipped by the indicated PlaneNode.
This is different from not specifying the PlaneNode; rather, this specifically contradicts set_clip_plane() at a higher node level (or, with a priority, overrides a set_clip_plane() at a lower level).
Definition at line 2553 of file nodePath.cxx.
References get_state(), is_empty(), TypedObject::is_of_type(), node(), and PandaNode::set_attrib().
void NodePath::set_clip_plane_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using no clip_planes at all.
This is different from not specifying a clip_plane; rather, this specifically contradicts set_clip_plane() at a higher node level (or, with a priority, overrides a set_clip_plane() at a lower level).
If no clip_planes are in effect on a particular piece of geometry, that geometry is rendered without being clipped (other than by the viewing frustum).
Definition at line 2540 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
|
inline |
Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.
If node_type is not TypeHandle::none(), then only nodes matching (or inheriting from) the indicated PandaNode subclass are modified.
The default is to change all bits, but if bits_to_change is not all bits on, then only the bits that are set in bits_to_change are modified, allowing this call to change only a subset of the bits in the subgraph.
Definition at line 1914 of file nodePath.I.
References is_empty(), and node().
void NodePath::set_color | ( | const LColor & | color, |
int | priority = 0 ) |
Applies a scene-graph color to the referenced node.
This color will apply to all geometry at this level and below (that does not specify a new color or a set_color_off()).
Definition at line 2028 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_color | ( | PN_stdfloat | r, |
PN_stdfloat | g, | ||
PN_stdfloat | b, | ||
PN_stdfloat | a = 1.0, | ||
int | priority = 0 ) |
Applies a scene-graph color to the referenced node.
This color will apply to all geometry at this level and below (that does not specify a new color or a set_color_off()).
Definition at line 2017 of file nodePath.cxx.
References set_color().
Referenced by set_color().
void NodePath::set_color_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using the geometry color.
This is normally the default, but it may be useful to use this to contradict set_color() at a higher node level (or, with a priority, to override a set_color() at a lower level).
Definition at line 2040 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_color_scale | ( | const LVecBase4 & | scale, |
int | priority = 0 ) |
Sets the color scale component of the transform, leaving translation and rotation untouched.
Definition at line 2145 of file nodePath.cxx.
References get_state(), is_empty(), node(), and PandaNode::set_attrib().
Referenced by NodePathCollection::set_color_scale(), set_color_scale(), set_sa(), set_sb(), set_sg(), set_sr(), and WindowFramework::set_wireframe().
|
inline |
Sets the color scale component of the transform.
Definition at line 987 of file nodePath.I.
References set_color_scale().
void NodePath::set_color_scale_off | ( | int | priority = 0 | ) |
Disables any color scale attribute inherited from above.
This is not the same thing as clear_color_scale(), which undoes any previous set_color_scale() operation on this node; rather, this actively disables any set_color_scale() that might be inherited from a parent node. This also disables set_alpha_scale() at the same time.
It is legal to specify a new color scale on the same node with a subsequent call to set_color_scale() or set_alpha_scale(); this new scale will apply to lower geometry.
Definition at line 2176 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Puts a compass effect on the node, so that it will retain a fixed rotation relative to the reference node (or render if the reference node is empty) regardless of the transforms above it.
Definition at line 4894 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
void NodePath::set_depth_offset | ( | int | bias, |
int | priority = 0 ) |
This instructs the graphics driver to apply an offset or bias to the generated depth values for rendered polygons, before they are written to the depth buffer.
This can be used to shift polygons forward slightly, to resolve depth conflicts, or self-shadowing artifacts on thin objects. The bias is always an integer number, and each integer increment represents the smallest possible increment in Z that is sufficient to completely resolve two coplanar polygons. Positive numbers are closer towards the camera.
Definition at line 4696 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_depth_test | ( | bool | depth_test, |
int | priority = 0 ) |
Specifically sets or disables the testing of the depth buffer on this particular node.
This is normally on in the 3-d scene graph and off in the 2-d scene graph; it should be on for rendering most 3-d objects properly.
Definition at line 4578 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by MultitexReducer::flatten(), and WindowFramework::get_render_2d().
void NodePath::set_depth_write | ( | bool | depth_write, |
int | priority = 0 ) |
Specifically sets or disables the writing to the depth buffer on this particular node.
This is normally on in the 3-d scene graph and off in the 2-d scene graph; it should be on for rendering most 3-d objects properly.
Definition at line 4635 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by MultitexReducer::flatten(), and WindowFramework::get_render_2d().
|
inline |
Adds the indicated render effect to the scene graph on this node.
If there was already an effect of the same type, it is replaced.
Definition at line 489 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_effect().
Referenced by set_scissor(), set_scissor(), set_scissor(), set_scissor(), and set_scissor().
|
inline |
Sets the complete RenderEffects that will be applied this node.
This completely replaces whatever has been set on this node via repeated calls to set_attrib().
Definition at line 529 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_effects.
void NodePath::set_fluid_pos | ( | const LVecBase3 & | pos | ) |
Sets the translation component, without changing the "previous" position, so that the collision system will see the node as moving fluidly from its previous position to its new position.
See Also: NodePath::set_pos
Definition at line 1009 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
void NodePath::set_fluid_pos | ( | const NodePath & | other, |
const LVecBase3 & | pos ) |
Sets the translation component of the transform, relative to the other node.
Definition at line 1451 of file nodePath.cxx.
References get_pos(), get_transform(), is_empty(), and set_transform().
|
inline |
Sets the translation component, without changing the "previous" position, so that the collision system will see the node as moving fluidly from its previous position to its new position.
Definition at line 816 of file nodePath.I.
References set_fluid_pos().
|
inline |
Sets the translation component, without changing the "previous" position, so that the collision system will see the node as moving fluidly from its previous position to its new position.
Definition at line 626 of file nodePath.I.
References set_fluid_pos().
Referenced by set_fluid_pos(), and set_fluid_pos().
void NodePath::set_fluid_x | ( | const NodePath & | other, |
PN_stdfloat | x ) |
Definition at line 1478 of file nodePath.cxx.
void NodePath::set_fluid_x | ( | PN_stdfloat | x | ) |
Definition at line 1015 of file nodePath.cxx.
void NodePath::set_fluid_y | ( | const NodePath & | other, |
PN_stdfloat | y ) |
Definition at line 1486 of file nodePath.cxx.
void NodePath::set_fluid_y | ( | PN_stdfloat | y | ) |
Definition at line 1023 of file nodePath.cxx.
void NodePath::set_fluid_z | ( | const NodePath & | other, |
PN_stdfloat | z ) |
Definition at line 1494 of file nodePath.cxx.
void NodePath::set_fluid_z | ( | PN_stdfloat | z | ) |
Definition at line 1031 of file nodePath.cxx.
void NodePath::set_fog | ( | Fog * | fog, |
int | priority = 0 ) |
Sets the geometry at this level and below to render using the indicated fog.
Definition at line 4272 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_fog_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using no fog.
This is normally the default, but it may be useful to use this to contradict set_fog() at a higher node level (or, with a priority, to override a set_fog() at a lower level).
Definition at line 4284 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_h | ( | const NodePath & | other, |
PN_stdfloat | h ) |
Definition at line 1559 of file nodePath.cxx.
void NodePath::set_h | ( | PN_stdfloat | h | ) |
Definition at line 1075 of file nodePath.cxx.
void NodePath::set_hpr | ( | const LVecBase3 & | hpr | ) |
Sets the rotation component of the transform, leaving translation and scale untouched.
Definition at line 1067 of file nodePath.cxx.
References get_transform(), TransformState::has_hpr(), is_empty(), and set_transform().
void NodePath::set_hpr | ( | const NodePath & | other, |
const LVecBase3 & | hpr ) |
Sets the rotation component of the transform, relative to the other node.
Definition at line 1530 of file nodePath.cxx.
References TransformState::get_hpr, TransformState::get_pos, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), set_hpr(), and set_transform().
|
inline |
Sets the rotation component of the transform, relative to the other node.
Definition at line 839 of file nodePath.I.
References set_hpr().
|
inline |
Sets the rotation component of the transform, leaving translation and scale untouched.
Definition at line 650 of file nodePath.I.
References set_hpr().
Referenced by SmoothMover::apply_smooth_hpr(), SmoothMover::apply_smooth_pos_hpr(), CLerpNodePathInterval::priv_step(), set_hpr(), set_hpr(), set_hpr(), set_tex_hpr(), and set_tex_hpr().
void NodePath::set_hpr_scale | ( | const LVecBase3 & | hpr, |
const LVecBase3 & | scale ) |
Sets the rotation and scale components of the transform, leaving translation untouched.
Definition at line 1280 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_shear, get_transform(), is_empty(), and set_transform().
void NodePath::set_hpr_scale | ( | const NodePath & | other, |
const LVecBase3 & | hpr, | ||
const LVecBase3 & | scale ) |
Sets the rotation and scale components of the transform, leaving translation untouched.
This, or set_pos_hpr_scale, is the preferred way to update a transform when both hpr and scale are to be changed.
Definition at line 1842 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_shear, get_transform(), is_empty(), and set_transform().
|
inline |
Sets the rotation and scale components of the transform, leaving translation untouched.
This, or set_pos_hpr_scale, is the preferred way to update a transform when both hpr and scale are to be changed.
Definition at line 937 of file nodePath.I.
References set_hpr_scale().
|
inline |
Sets the rotation and scale components of the transform, leaving translation untouched.
Definition at line 736 of file nodePath.I.
References set_hpr_scale().
Referenced by CLerpNodePathInterval::priv_step(), set_hpr_scale(), and set_hpr_scale().
void NodePath::set_instance_count | ( | int | instance_count | ) |
Sets the geometry instance count, or 0 if geometry instancing should be disabled.
Do not confuse with instanceTo which only applies to animation instancing.
Definition at line 3448 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_light | ( | const NodePath & | light, |
int | priority = 0 ) |
Adds the indicated Light or PolylightNode to the list of lights that illuminate geometry at this node and below.
The light itself should be parented into the scene graph elsewhere, to represent the light's position in space; but until set_light() is called it will illuminate no geometry.
Definition at line 2259 of file nodePath.cxx.
References PandaNode::as_light(), get_state(), is_empty(), TypedObject::is_of_type(), node(), PandaNode::set_attrib(), and PandaNode::set_effect().
Referenced by WindowFramework::set_lighting().
void NodePath::set_light_off | ( | const NodePath & | light, |
int | priority = 0 ) |
Sets the geometry at this level and below to render without using the indicated Light.
This is different from not specifying the Light; rather, this specifically contradicts set_light() at a higher node level (or, with a priority, overrides a set_light() at a lower level).
This interface does not support PolylightNodes, which cannot be turned off at a lower level.
Definition at line 2336 of file nodePath.cxx.
References PandaNode::as_light(), get_state(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_light_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using no lights at all.
This is different from not specifying a light; rather, this specifically contradicts set_light() at a higher node level (or, with a priority, overrides a set_light() at a lower level).
If no lights are in effect on a particular piece of geometry, that geometry is rendered with lighting disabled.
Definition at line 2320 of file nodePath.cxx.
References PandaNode::clear_effect(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_logic_op | ( | LogicOpAttrib::Operation | op, |
int | priority = 0 ) |
Specifically sets or disables a logical operation on this particular node.
If no other nodes override, this will cause geometry to be rendered without color blending but instead using the given logical operator.
Definition at line 4982 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_mat | ( | const LMatrix4 & | mat | ) |
Directly sets an arbitrary 4x4 transform matrix.
Definition at line 1357 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
Referenced by StaticTextFont::StaticTextFont(), and PGEntry::xform().
void NodePath::set_mat | ( | const NodePath & | other, |
const LMatrix4 & | mat ) |
Converts the indicated matrix from the other's coordinate space to the local coordinate space, and applies it to the node.
Definition at line 1946 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_material | ( | Material * | mat, |
int | priority = 0 ) |
Sets the geometry at this level and below to render using the indicated material.
Previously, this operation made a copy of the material structure, but nowadays it assigns the pointer directly.
Definition at line 4181 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_material_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using no material.
This is normally the default, but it may be useful to use this to contradict set_material() at a higher node level (or, with a priority, to override a set_material() at a lower level).
Definition at line 4194 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by WindowFramework::get_render_2d(), FrameRateMeter::setup_window(), and SceneGraphAnalyzerMeter::setup_window().
|
inlinestatic |
Certain operations, such as find() or find_all_matches(), require a traversal of the scene graph to search for the target node or nodes.
This traversal does not attempt to detect cycles, so an arbitrary cap is set on the depth of the traversal as a poor man's cycle detection, in the event that a cycle has inadvertently been introduced into the scene graph.
There may be other reasons you'd want to truncate a search before the bottom of the scene graph has been reached. In any event, this function sets the limit on the number of levels that a traversal will continue, and hence the maximum length of a path that may be returned by a traversal.
This is a static method, and so changing this parameter affects all of the NodePaths in the universe.
Definition at line 170 of file nodePath.I.
void NodePath::set_occluder | ( | const NodePath & | occluder | ) |
Adds the indicated occluder to the list of occluders that apply to geometry at this node and below.
The occluder itself, an OccluderNode, should be parented into the scene graph elsewhere, to represent the occluder's position in space; but until set_occluder() is called it will clip no geometry.
Definition at line 2687 of file nodePath.cxx.
References is_empty(), TypedObject::is_of_type(), node(), and PandaNode::set_effect().
void NodePath::set_p | ( | const NodePath & | other, |
PN_stdfloat | p ) |
Definition at line 1567 of file nodePath.cxx.
void NodePath::set_p | ( | PN_stdfloat | p | ) |
Definition at line 1085 of file nodePath.cxx.
void NodePath::set_pos | ( | const LVecBase3 & | pos | ) |
Sets the translation component of the transform, leaving rotation and scale untouched.
This also resets the node's "previous" position, so that the collision system will see the node as having suddenly appeared in the new position, without passing any points in between. See Also: NodePath::set_fluid_pos
Definition at line 958 of file nodePath.cxx.
References get_transform(), is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_pos | ( | const NodePath & | other, |
const LVecBase3 & | pos ) |
Sets the translation component of the transform, relative to the other node.
Definition at line 1398 of file nodePath.cxx.
References get_pos(), get_transform(), is_empty(), node(), PandaNode::reset_prev_transform(), set_pos_hpr_scale_shear(), and set_transform().
|
inline |
Sets the translation component of the transform, relative to the other node.
Definition at line 806 of file nodePath.I.
void NodePath::set_pos_hpr | ( | const LVecBase3 & | pos, |
const LVecBase3 & | hpr ) |
Sets the translation and rotation component of the transform, leaving scale untouched.
Definition at line 1252 of file nodePath.cxx.
References TransformState::get_scale, TransformState::get_shear, get_transform(), is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_pos_hpr | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LVecBase3 & | hpr ) |
Sets the translation and rotation component of the transform, relative to the other node.
Definition at line 1771 of file nodePath.cxx.
References TransformState::get_hpr, TransformState::get_pos, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), node(), PandaNode::reset_prev_transform(), set_pos_hpr_scale_shear(), and set_transform().
|
inline |
Sets the translation and rotation component of the transform, relative to the other node.
Definition at line 925 of file nodePath.I.
References set_pos_hpr().
|
inline |
Sets the translation and rotation component of the transform, leaving scale untouched.
Definition at line 727 of file nodePath.I.
References set_pos_hpr().
Referenced by SmoothMover::handle_wrt_reparent(), CLerpNodePathInterval::priv_step(), set_pos_hpr(), and set_pos_hpr().
void NodePath::set_pos_hpr_scale | ( | const LVecBase3 & | pos, |
const LVecBase3 & | hpr, | ||
const LVecBase3 & | scale ) |
Replaces the translation, rotation, and scale components, implicitly setting shear to 0.
Definition at line 1306 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_pos_hpr_scale | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LVecBase3 & | hpr, | ||
const LVecBase3 & | scale ) |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node, implicitly setting shear to 0.
Definition at line 1876 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
|
inline |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node.
Definition at line 947 of file nodePath.I.
References set_pos_hpr_scale().
|
inline |
Completely replaces the transform with new translation, rotation, and scale components.
Definition at line 745 of file nodePath.I.
References set_pos_hpr_scale().
Referenced by CLerpNodePathInterval::priv_step(), set_pos_hpr_scale(), and set_pos_hpr_scale().
void NodePath::set_pos_hpr_scale_shear | ( | const LVecBase3 & | pos, |
const LVecBase3 & | hpr, | ||
const LVecBase3 & | scale, | ||
const LVecBase3 & | shear ) |
Completely replaces the transform with new translation, rotation, scale, and shear components.
Definition at line 1332 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
Referenced by CLerpNodePathInterval::priv_step(), set_pos(), and set_pos_hpr().
void NodePath::set_pos_hpr_scale_shear | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LVecBase3 & | hpr, | ||
const LVecBase3 & | scale, | ||
const LVecBase3 & | shear ) |
Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node.
Definition at line 1904 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_pos_quat | ( | const LVecBase3 & | pos, |
const LQuaternion & | quat ) |
Sets the translation and rotation component of the transform, leaving scale untouched.
Definition at line 1266 of file nodePath.cxx.
References TransformState::get_scale, TransformState::get_shear, get_transform(), is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
Referenced by CConstrainPosHprInterval::priv_step(), and CLerpNodePathInterval::priv_step().
void NodePath::set_pos_quat | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LQuaternion & | quat ) |
Sets the translation and rotation component of the transform, relative to the other node.
Definition at line 1806 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_quat, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), node(), PandaNode::reset_prev_transform(), set_pos_quat_scale_shear(), and set_transform().
void NodePath::set_pos_quat_scale | ( | const LVecBase3 & | pos, |
const LQuaternion & | quat, | ||
const LVecBase3 & | scale ) |
Replaces the translation, rotation, and scale components, implicitly setting shear to 0.
Definition at line 1319 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
Referenced by CLerpNodePathInterval::priv_step().
void NodePath::set_pos_quat_scale | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LQuaternion & | quat, | ||
const LVecBase3 & | scale ) |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node, implicitly setting shear to 0.
Definition at line 1890 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_pos_quat_scale_shear | ( | const LVecBase3 & | pos, |
const LQuaternion & | quat, | ||
const LVecBase3 & | scale, | ||
const LVecBase3 & | shear ) |
Completely replaces the transform with new translation, rotation, scale, and shear components.
Definition at line 1345 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
Referenced by CLerpNodePathInterval::priv_step(), and set_pos_quat().
void NodePath::set_pos_quat_scale_shear | ( | const NodePath & | other, |
const LVecBase3 & | pos, | ||
const LQuaternion & | quat, | ||
const LVecBase3 & | scale, | ||
const LVecBase3 & | shear ) |
Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node.
Definition at line 1918 of file nodePath.cxx.
References is_empty(), node(), PandaNode::reset_prev_transform(), and set_transform().
void NodePath::set_quat | ( | const LQuaternion & | quat | ) |
Sets the rotation component of the transform, leaving translation and scale untouched.
Definition at line 1120 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
Referenced by do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), heads_up(), heads_up(), look_at(), look_at(), CConstrainHprInterval::priv_step(), CLerpNodePathInterval::priv_step(), and set_quat().
void NodePath::set_quat | ( | const NodePath & | other, |
const LQuaternion & | quat ) |
Sets the rotation component of the transform, relative to the other node.
Definition at line 1598 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_quat, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), set_quat(), and set_transform().
void NodePath::set_quat_scale | ( | const LQuaternion & | quat, |
const LVecBase3 & | scale ) |
Sets the rotation and scale components of the transform, leaving translation untouched.
Definition at line 1293 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_shear, get_transform(), is_empty(), and set_transform().
Referenced by CLerpNodePathInterval::priv_step().
void NodePath::set_quat_scale | ( | const NodePath & | other, |
const LQuaternion & | quat, | ||
const LVecBase3 & | scale ) |
Sets the rotation and scale components of the transform, leaving translation untouched.
This, or set_pos_quat_scale, is the preferred way to update a transform when both quat and scale are to be changed.
Definition at line 1859 of file nodePath.cxx.
References TransformState::get_pos, TransformState::get_shear, get_transform(), is_empty(), and set_transform().
void NodePath::set_r | ( | const NodePath & | other, |
PN_stdfloat | r ) |
Definition at line 1575 of file nodePath.cxx.
void NodePath::set_r | ( | PN_stdfloat | r | ) |
Definition at line 1095 of file nodePath.cxx.
void NodePath::set_render_mode | ( | RenderModeAttrib::Mode | mode, |
PN_stdfloat | thickness, | ||
int | priority = 0 ) |
Sets up the geometry at this level and below (unless overridden) to render in the specified mode and with the indicated line and/or point thickness.
Definition at line 4433 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_render_mode_filled | ( | int | priority = 0 | ) |
Sets up the geometry at this level and below (unless overridden) to render in filled (i.e.
not wireframe) mode.
Definition at line 4374 of file nodePath.cxx.
References RenderModeAttrib::get_perspective, RenderModeAttrib::get_thickness, is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_render_mode_filled_wireframe | ( | const LColor & | wireframe_color, |
int | priority = 0 ) |
Sets up the geometry at this level and below (unless overridden) to render in filled, but overlay the wireframe on top with a fixed color.
This is useful for debug visualizations.
Definition at line 4387 of file nodePath.cxx.
References RenderModeAttrib::get_perspective, RenderModeAttrib::get_thickness, is_empty(), node(), and PandaNode::set_attrib().
Referenced by PandaFramework::set_highlight().
void NodePath::set_render_mode_perspective | ( | bool | perspective, |
int | priority = 0 ) |
Sets up the point geometry at this level and below to render as perspective sprites (that is, billboarded quads).
The thickness, as specified with set_render_mode_thickness(), is the width of each point in 3-D units, unless it is overridden on a per-vertex basis. This does not affect geometry other than points.
If you want the quads to be individually textured, you should also set a TexGenAttrib::M_point_sprite on the node.
Definition at line 4405 of file nodePath.cxx.
References RenderModeAttrib::get_mode, RenderModeAttrib::get_thickness, RenderModeAttrib::get_wireframe_color, is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_render_mode_thickness | ( | PN_stdfloat | thickness, |
int | priority = 0 ) |
Sets up the point geometry at this level and below to render as thick points (that is, billboarded quads).
The thickness is in pixels, unless set_render_mode_perspective is also true, in which case it is in 3-D units.
If you want the quads to be individually textured, you should also set a TexGenAttrib::M_point_sprite on the node.
Definition at line 4421 of file nodePath.cxx.
References RenderModeAttrib::get_mode, RenderModeAttrib::get_perspective, RenderModeAttrib::get_wireframe_color, is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_render_mode_wireframe | ( | int | priority = 0 | ) |
Sets up the geometry at this level and below (unless overridden) to render in wireframe mode.
Definition at line 4362 of file nodePath.cxx.
References RenderModeAttrib::get_perspective, RenderModeAttrib::get_thickness, is_empty(), node(), and PandaNode::set_attrib().
Referenced by WindowFramework::set_wireframe().
|
inline |
Sets the alpha component of the color scale.
Definition at line 1040 of file nodePath.I.
References get_color_scale(), and set_color_scale().
|
inline |
Sets the blue component of the color scale.
Definition at line 1028 of file nodePath.I.
References get_color_scale(), and set_color_scale().
void NodePath::set_scale | ( | const LVecBase3 & | scale | ) |
Sets the scale component of the transform, leaving translation and rotation untouched.
Definition at line 1141 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
void NodePath::set_scale | ( | const NodePath & | other, |
const LVecBase3 & | scale ) |
Sets the scale component of the transform, relative to the other node.
Definition at line 1640 of file nodePath.cxx.
References TransformState::get_hpr, TransformState::get_pos, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), set_scale(), and set_transform().
|
inline |
Sets the scale component of the transform, relative to the other node.
Definition at line 862 of file nodePath.I.
References set_scale().
|
inline |
Sets the scale component of the transform, relative to the other node.
Definition at line 870 of file nodePath.I.
References set_scale().
|
inline |
Sets the scale component of the transform, leaving translation and rotation untouched.
Definition at line 674 of file nodePath.I.
References set_scale().
Referenced by WindowFramework::adjust_dimensions(), MayaPview::doIt(), PandaFramework::event_f9(), PandaFramework::event_question(), WindowFramework::get_aspect_2d(), CLerpNodePathInterval::priv_step(), set_scale(), set_scale(), set_scale(), set_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), and set_tex_scale().
|
inline |
Definition at line 679 of file nodePath.I.
void NodePath::set_scissor | ( | const LPoint3 & | a, |
const LPoint3 & | b ) |
Sets up a scissor region on the nodes rendered at this level and below.
The two points are understood to be relative to this node. When these points are projected into screen space, they define the diagonally-opposite points that determine the scissor region.
Definition at line 2785 of file nodePath.cxx.
References set_effect().
void NodePath::set_scissor | ( | const LPoint3 & | a, |
const LPoint3 & | b, | ||
const LPoint3 & | c, | ||
const LPoint3 & | d ) |
Sets up a scissor region on the nodes rendered at this level and below.
The four points are understood to be relative to this node. When these points are projected into screen space, they define the bounding volume of the scissor region (the scissor region is the smallest onscreen rectangle that encloses all four points).
Definition at line 2797 of file nodePath.cxx.
References set_effect().
void NodePath::set_scissor | ( | const NodePath & | other, |
const LPoint3 & | a, | ||
const LPoint3 & | b ) |
Sets up a scissor region on the nodes rendered at this level and below.
The two points are understood to be relative to the indicated other node. When these points are projected into screen space, they define the diagonally-opposite points that determine the scissor region.
Definition at line 2809 of file nodePath.cxx.
References set_effect().
void NodePath::set_scissor | ( | const NodePath & | other, |
const LPoint3 & | a, | ||
const LPoint3 & | b, | ||
const LPoint3 & | c, | ||
const LPoint3 & | d ) |
Sets up a scissor region on the nodes rendered at this level and below.
The four points are understood to be relative to the indicated other node. When these points are projected into screen space, they define the bounding volume of the scissor region (the scissor region is the smallest onscreen rectangle that encloses all four points).
Definition at line 2821 of file nodePath.cxx.
References set_effect().
void NodePath::set_scissor | ( | PN_stdfloat | left, |
PN_stdfloat | right, | ||
PN_stdfloat | bottom, | ||
PN_stdfloat | top ) |
Sets up a scissor region on the nodes rendered at this level and below.
The four coordinates are understood to define a rectangle in screen space. These numbers are relative to the current DisplayRegion, where (0,0) is the lower-left corner of the DisplayRegion, and (1,1) is the upper-right corner.
Definition at line 2774 of file nodePath.cxx.
References set_effect().
|
inline |
Sets the green component of the color scale.
Definition at line 1016 of file nodePath.I.
References get_color_scale(), and set_color_scale().
void NodePath::set_shader | ( | const Shader * | sha, |
int | priority = 0 ) |
Definition at line 3256 of file nodePath.cxx.
void NodePath::set_shader_auto | ( | BitMask32 | shader_switch, |
int | priority = 0 ) |
overloaded for auto shader customization
Definition at line 3306 of file nodePath.cxx.
References get_state(), is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_shader_auto | ( | int | priority = 0 | ) |
Definition at line 3285 of file nodePath.cxx.
void NodePath::set_shader_input | ( | const ShaderInput & | input | ) |
Definition at line 3356 of file nodePath.cxx.
|
inline |
Definition at line 1233 of file nodePath.I.
|
inline |
Definition at line 1225 of file nodePath.I.
|
inline |
Definition at line 1152 of file nodePath.I.
|
inline |
Definition at line 1201 of file nodePath.I.
|
inline |
Definition at line 1144 of file nodePath.I.
|
inline |
Definition at line 1193 of file nodePath.I.
|
inline |
Definition at line 1136 of file nodePath.I.
|
inline |
Definition at line 1185 of file nodePath.I.
|
inline |
Definition at line 1273 of file nodePath.I.
|
inline |
Definition at line 1095 of file nodePath.I.
|
inline |
Definition at line 1087 of file nodePath.I.
|
inline |
Definition at line 1103 of file nodePath.I.
|
inline |
Definition at line 1217 of file nodePath.I.
|
inline |
Definition at line 1209 of file nodePath.I.
|
inline |
Definition at line 1128 of file nodePath.I.
|
inline |
Definition at line 1177 of file nodePath.I.
|
inline |
Definition at line 1119 of file nodePath.I.
|
inline |
Definition at line 1168 of file nodePath.I.
|
inline |
Definition at line 1111 of file nodePath.I.
|
inline |
Definition at line 1160 of file nodePath.I.
|
inline |
Definition at line 1281 of file nodePath.I.
|
inline |
Definition at line 1289 of file nodePath.I.
|
inline |
Definition at line 1265 of file nodePath.I.
|
inline |
Definition at line 1257 of file nodePath.I.
|
inline |
Definition at line 1249 of file nodePath.I.
|
inline |
Definition at line 1241 of file nodePath.I.
void NodePath::set_shader_input | ( | ShaderInput && | input | ) |
Definition at line 3376 of file nodePath.cxx.
void NodePath::set_shader_off | ( | int | priority = 0 | ) |
Definition at line 3277 of file nodePath.cxx.
void NodePath::set_shear | ( | const LVecBase3 & | shear | ) |
Sets the shear component of the transform, leaving translation and rotation untouched.
Definition at line 1204 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
void NodePath::set_shear | ( | const NodePath & | other, |
const LVecBase3 & | shear ) |
Sets the shear component of the transform, relative to the other node.
Definition at line 1705 of file nodePath.cxx.
References TransformState::get_hpr, TransformState::get_pos, TransformState::get_scale, TransformState::get_shear, get_transform(), TransformState::has_components(), is_empty(), set_shear(), and set_transform().
|
inline |
Sets the shear component of the transform, relative to the other node.
Definition at line 897 of file nodePath.I.
References set_shear().
|
inline |
Sets the shear component of the transform, leaving translation, rotation, and scale untouched.
Definition at line 703 of file nodePath.I.
References set_shear().
Referenced by CLerpNodePathInterval::priv_step(), set_shear(), set_shear(), and set_shear().
void NodePath::set_shxy | ( | const NodePath & | other, |
PN_stdfloat | shxy ) |
Definition at line 1733 of file nodePath.cxx.
void NodePath::set_shxy | ( | PN_stdfloat | shxy | ) |
Definition at line 1211 of file nodePath.cxx.
void NodePath::set_shxz | ( | const NodePath & | other, |
PN_stdfloat | shxz ) |
Definition at line 1741 of file nodePath.cxx.
void NodePath::set_shxz | ( | PN_stdfloat | shxz | ) |
Definition at line 1220 of file nodePath.cxx.
void NodePath::set_shyz | ( | const NodePath & | other, |
PN_stdfloat | shyz ) |
Definition at line 1749 of file nodePath.cxx.
void NodePath::set_shyz | ( | PN_stdfloat | shyz | ) |
Definition at line 1229 of file nodePath.cxx.
|
inline |
Sets the red component of the color scale.
Definition at line 1004 of file nodePath.I.
References get_color_scale(), and set_color_scale().
|
inline |
Changes the complete state object on this node.
Definition at line 426 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_state.
Referenced by NodePathCollection::compose_color_scale(), copy_to(), CLerpNodePathInterval::priv_step(), NodePathCollection::set_attrib(), NodePathCollection::set_color_scale(), NodePathCollection::set_texture(), and NodePathCollection::set_texture_off().
void NodePath::set_sx | ( | const NodePath & | other, |
PN_stdfloat | sx ) |
Definition at line 1668 of file nodePath.cxx.
void NodePath::set_sx | ( | PN_stdfloat | sx | ) |
Sets the x-scale component of the transform, leaving other components untouched.
Definition at line 1153 of file nodePath.cxx.
References TransformState::get_scale, get_transform(), is_empty(), and set_transform().
Referenced by WindowFramework::adjust_dimensions(), and WindowFramework::get_pixel_2d().
void NodePath::set_sy | ( | const NodePath & | other, |
PN_stdfloat | sy ) |
Definition at line 1676 of file nodePath.cxx.
void NodePath::set_sy | ( | PN_stdfloat | sy | ) |
Sets the y-scale component of the transform, leaving other components untouched.
Definition at line 1167 of file nodePath.cxx.
References TransformState::get_scale, get_transform(), is_empty(), and set_transform().
Referenced by WindowFramework::adjust_dimensions(), and WindowFramework::get_pixel_2d().
void NodePath::set_sz | ( | const NodePath & | other, |
PN_stdfloat | sz ) |
Definition at line 1684 of file nodePath.cxx.
void NodePath::set_sz | ( | PN_stdfloat | sz | ) |
Sets the z-scale component of the transform, leaving other components untouched.
Definition at line 1181 of file nodePath.cxx.
References TransformState::get_scale, get_transform(), is_empty(), and set_transform().
Referenced by WindowFramework::adjust_dimensions(), and WindowFramework::get_pixel_2d().
|
inline |
Associates a user-defined value with a user-defined key which is stored on the node.
This value has no meaning to Panda; but it is stored indefinitely on the node until it is requested again.
Each unique key stores a different string value. There is no effective limit on the number of different keys that may be stored or on the length of any one key's value.
Definition at line 1998 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_tag.
void NodePath::set_tex_gen | ( | TextureStage * | stage, |
RenderAttrib::TexGenMode | mode, | ||
const LTexCoord3 & | constant_value, | ||
int | priority = 0 ) |
Enables automatic texture coordinate generation for the indicated texture stage.
This version of this method is useful when setting M_constant, which requires a constant texture coordinate value.
Definition at line 3640 of file nodePath.cxx.
References get_state(), is_empty(), node(), and PandaNode::set_attrib().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1661 of file nodePath.I.
References is_empty(), set_hpr(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1650 of file nodePath.I.
References set_tex_hpr().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1444 of file nodePath.I.
References is_empty(), set_hpr(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, as a 3-D HPR, to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1433 of file nodePath.I.
References set_tex_hpr().
Referenced by set_tex_hpr(), and set_tex_hpr().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1528 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1517 of file nodePath.I.
References set_tex_offset().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1311 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1300 of file nodePath.I.
References set_tex_offset().
Referenced by set_tex_offset(), and set_tex_offset().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1637 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1626 of file nodePath.I.
References set_tex_pos().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1420 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated offset to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1409 of file nodePath.I.
References set_tex_pos().
Referenced by set_tex_pos(), and set_tex_pos().
void NodePath::set_tex_projector | ( | TextureStage * | stage, |
const NodePath & | from, | ||
const NodePath & | to, | ||
int | lens_index = 0 ) |
Establishes a TexProjectorEffect on this node, which can be used to establish projective texturing (but see also the NodePath::project_texture() convenience function), or it can be used to bind this node's texture transform to particular node's position in space, allowing a LerpInterval (for instance) to adjust this node's texture coordinates.
If to is a LensNode, then the fourth parameter, lens_index, can be provided to select a particular lens to apply. Otherwise lens_index is not used.
Definition at line 3742 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
Referenced by project_texture().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, clockwise in degrees, to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1541 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated rotation, clockwise in degrees, to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1324 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1578 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1685 of file nodePath.I.
References is_empty(), set_scale(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage.
This call is appropriate for 2-d or 3-d texture coordinates.
Definition at line 1554 of file nodePath.I.
References is_empty(), set_scale(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1567 of file nodePath.I.
References set_tex_scale().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1674 of file nodePath.I.
References set_tex_scale().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1361 of file nodePath.I.
References is_empty(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1468 of file nodePath.I.
References is_empty(), set_scale(), and set_tex_transform().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage.
This call is appropriate for 2-d or 3-d texture coordinates.
Definition at line 1337 of file nodePath.I.
References is_empty(), set_scale(), and set_tex_transform().
Referenced by set_tex_scale(), set_tex_scale(), set_tex_scale(), and set_tex_scale().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UV's for the given stage.
This call is appropriate for ordinary 2-d texture coordinates.
Definition at line 1350 of file nodePath.I.
References set_tex_scale().
|
inline |
Sets a texture matrix on the current node to apply the indicated scale to UVW's for the given stage.
This call is appropriate for 3-d texture coordinates.
Definition at line 1457 of file nodePath.I.
References set_tex_scale().
void NodePath::set_tex_transform | ( | TextureStage * | stage, |
const TransformState * | transform ) |
Sets the texture matrix on the current node to the indicated transform for the given stage.
Definition at line 3468 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by set_tex_hpr(), set_tex_hpr(), set_tex_offset(), set_tex_offset(), set_tex_pos(), set_tex_pos(), set_tex_rotate(), set_tex_rotate(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), set_tex_scale(), and set_tex_scale().
void NodePath::set_texture | ( | Texture * | tex, |
const SamplerState & | sampler, | ||
int | priority = 0 ) |
Adds the indicated texture to the list of textures that will be rendered on the default texture stage.
The given sampler state will override the sampling settings on the texture itself. Note that this method makes a copy of the sampler settings that you give; further changes to this object will not be reflected.
This is the convenience single-texture variant of this method; it is now superceded by set_texture() that accepts a stage and texture. You may use this method if you just want to adjust the default stage.
Definition at line 2982 of file nodePath.cxx.
References TextureStage::get_default, is_empty(), and set_texture().
void NodePath::set_texture | ( | Texture * | tex, |
int | priority = 0 ) |
Adds the indicated texture to the list of textures that will be rendered on the default texture stage.
This is the convenience single-texture variant of this method; it is now superceded by set_texture() that accepts a stage and texture. You may use this method if you just want to adjust the default stage.
Definition at line 2936 of file nodePath.cxx.
References TextureStage::get_default, is_empty(), and set_texture().
Referenced by GraphicsOutput::get_texture_card(), PfmTrans::process_pfm(), project_texture(), set_texture(), set_texture(), and NodePathCollection::set_texture().
void NodePath::set_texture | ( | TextureStage * | stage, |
Texture * | tex, | ||
const SamplerState & | sampler, | ||
int | priority = 0 ) |
Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.
If there are multiple texture stages specified (possibly on multiple different nodes at different levels), they will all be applied to geometry together, according to the stage specification set up in the TextureStage object.
The given sampler state will override the sampling settings on the texture itself. Note that this method makes a copy of the sampler settings that you give; further changes to this object will not be reflected.
Definition at line 3000 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_texture | ( | TextureStage * | stage, |
Texture * | tex, | ||
int | priority = 0 ) |
Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.
If there are multiple texture stages specified (possibly on multiple different nodes at different levels), they will all be applied to geometry together, according to the stage specification set up in the TextureStage object.
Definition at line 2950 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
void NodePath::set_texture_off | ( | int | priority = 0 | ) |
Sets the geometry at this level and below to render using no texture, on any stage.
This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).
Definition at line 3026 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by WindowFramework::set_texture(), and NodePathCollection::set_texture_off().
void NodePath::set_texture_off | ( | TextureStage * | stage, |
int | priority = 0 ) |
Sets the geometry at this level and below to render using no texture, on the indicated stage.
This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).
Definition at line 3038 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
|
inline |
Changes the complete transform object on this node.
Definition at line 564 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_transform.
Referenced by clear_transform(), clear_transform(), BulletCharacterControllerNode::do_sync_b2p(), BulletGhostNode::do_sync_b2p(), BulletSoftBodyNode::do_sync_b2p(), BulletVehicle::do_sync_b2p(), CConstrainTransformInterval::priv_step(), set_fluid_pos(), set_fluid_pos(), set_hpr(), set_hpr(), set_hpr_scale(), set_hpr_scale(), set_mat(), set_mat(), set_pos(), set_pos(), set_pos_hpr(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_pos_quat_scale_shear(), set_quat(), set_quat(), set_quat_scale(), set_quat_scale(), set_scale(), set_scale(), set_shear(), set_shear(), set_sx(), set_sy(), set_sz(), PhysxActor::update_transform(), and wrt_reparent_to().
void NodePath::set_transparency | ( | TransparencyAttrib::Mode | mode, |
int | priority = 0 ) |
Specifically sets or disables transparent rendering mode on this particular node.
If no other nodes override, this will cause items with a non-1 value for alpha color to be rendered partially transparent.
Definition at line 4923 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by PfmTrans::process_pfm().
void NodePath::set_two_sided | ( | bool | two_sided, |
int | priority = 0 ) |
Specifically sets or disables two-sided rendering mode on this particular node.
If no other nodes override, this will cause backfacing polygons to be drawn (in two-sided mode, true) or culled (in one-sided mode, false).
Definition at line 4517 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by NonlinearImager::add_viewer(), MultitexReducer::flatten(), WindowFramework::get_render(), WindowFramework::get_render_2d(), WindowFramework::set_two_sided(), WindowFramework::set_wireframe(), FrameRateMeter::setup_window(), and SceneGraphAnalyzerMeter::setup_window().
void NodePath::set_x | ( | const NodePath & | other, |
PN_stdfloat | x ) |
Definition at line 1423 of file nodePath.cxx.
void NodePath::set_x | ( | PN_stdfloat | x | ) |
Sets the X component of the position transform, leaving other components untouched.
Definition at line 970 of file nodePath.cxx.
References get_pos(), and is_empty().
void NodePath::set_y | ( | const NodePath & | other, |
PN_stdfloat | y ) |
Definition at line 1431 of file nodePath.cxx.
void NodePath::set_y | ( | PN_stdfloat | y | ) |
Sets the Y component of the position transform, leaving other components untouched.
Definition at line 983 of file nodePath.cxx.
References get_pos(), and is_empty().
void NodePath::set_z | ( | const NodePath & | other, |
PN_stdfloat | z ) |
Definition at line 1439 of file nodePath.cxx.
void NodePath::set_z | ( | PN_stdfloat | z | ) |
Sets the Z component of the position transform, leaving other components untouched.
Definition at line 996 of file nodePath.cxx.
References get_pos(), and is_empty().
|
inline |
Undoes the effect of a previous hide() on this node: makes the referenced node (and the entire subgraph below this node) visible to all cameras.
This will not reveal the node if a parent node has been hidden.
Definition at line 1795 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
Referenced by ShowInterval::priv_instant(), HideInterval::priv_reverse_instant(), NonlinearImager::set_screen_active(), and PandaFramework::show_collision_solids().
|
inline |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.
This undoes the effect of a previous hide() call. It will not reveal the node if a parent node has been hidden. However, see show_through().
Definition at line 1808 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
void NodePath::show_bounds | ( | ) |
Causes the bounding volume of the bottom node and all of its descendants (that is, the bounding volume associated with the the bottom arc) to be rendered, if possible.
The rendering method is less than optimal; this is intended primarily for debugging.
Definition at line 5435 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
Referenced by PandaFramework::set_highlight().
|
inline |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.
Unlike show(), this will reveal the node even if a parent node has been hidden, thus "showing through" a parent's hide().
Definition at line 1822 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
|
inline |
Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.
Unlike show(), this will reveal the node even if a parent node has been hidden via the one-parameter hide() method, thus "showing through" a parent's hide(). (However, it will not show through a parent's hide() call if the no-parameter form of hide() was used.)
Definition at line 1837 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< uint32_t, 32 >::all_off(), is_empty(), and node().
void NodePath::show_tight_bounds | ( | ) |
Similar to show_bounds(), this draws a bounding box representing the "tight" bounds of this node and all of its descendants.
The bounding box is recomputed every frame by reexamining all of the vertices; this is far from efficient, but this is intended for debugging.
Definition at line 5447 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_effect().
void NodePath::stash | ( | int | sort = 0, |
Thread * | current_thread = Thread::get_current_thread() ) |
Removes the referenced node (and the entire subgraph below this node) from the scene graph in any normal sense.
The node will no longer be visible and is not tested for collisions; furthermore, no normal scene graph traversal will visit the node. The node's bounding volume no longer contributes to its parent's bounding volume.
A stashed node cannot be located by a normal find() operation (although a special find string can still retrieve it).
Definition at line 5218 of file nodePath.cxx.
References Thread::get_pipeline_stage, is_empty(), is_singleton(), and verify_complete().
void NodePath::stash_to | ( | const NodePath & | other, |
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) |
Similar to reparent_to(), but the node is added to its new parent's stashed list, so that the result is equivalent to calling reparent_to() immediately followed by stash().
Definition at line 414 of file nodePath.cxx.
References Thread::get_pipeline_stage, is_empty(), node(), PandaNode::reset_prev_transform(), and verify_complete().
void NodePath::unify_texture_stages | ( | TextureStage * | stage | ) |
Searches through all TextureStages at this node and below.
Any TextureStages that share the same name as the indicated TextureStage object are replaced with this object, thus ensuring that all geometry at this node and below with a particular TextureStage name is using the same TextureStage object.
Definition at line 4092 of file nodePath.cxx.
References is_empty(), and node().
void NodePath::unstash | ( | int | sort = 0, |
Thread * | current_thread = Thread::get_current_thread() ) |
Undoes the effect of a previous stash() on this node: makes the referenced node (and the entire subgraph below this node) once again part of the scene graph.
Definition at line 5235 of file nodePath.cxx.
References Thread::get_pipeline_stage, is_empty(), is_singleton(), and verify_complete().
Referenced by instance_to(), and unstash_all().
void NodePath::unstash_all | ( | Thread * | current_thread = Thread::get_current_thread() | ) |
Unstashes this node and all stashed child nodes.
Definition at line 5250 of file nodePath.cxx.
References find_all_matches(), NodePathCollection::unstash(), and unstash().
bool NodePath::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.
Definition at line 5334 of file nodePath.cxx.
References PandaNode::find_parent(), NodePathComponent::get_length(), NodePathComponent::get_next(), NodePathComponent::get_node(), Thread::get_pipeline_stage, is_empty(), Thread::is_true_threads, and node().
Referenced by attach_new_node(), attach_new_node(), copy_to(), CPT(), CPT(), find_all_matches(), find_all_paths_to(), instance_to(), reparent_to(), stash(), stash_to(), unstash(), and wrt_reparent_to().
bool NodePath::write_bam_file | ( | const Filename & | filename | ) | const |
Writes the contents of this node and below out to a bam file with the indicated filename.
This file may then be read in again, as is, at some later point. Returns true if successful, false on some kind of error.
Definition at line 5696 of file nodePath.cxx.
References BamFile::close(), BamFile::get_writer, is_empty(), node(), BamFile::open_write(), and BamFile::write_object().
Referenced by MayaPview::doIt().
bool NodePath::write_bam_stream | ( | std::ostream & | out | ) | const |
Writes the contents of this node and below out to the indicated stream.
Definition at line 5720 of file nodePath.cxx.
References BamFile::close(), BamFile::get_writer, is_empty(), node(), BamFile::open_write(), and BamFile::write_object().
void NodePath::write_bounds | ( | std::ostream & | out | ) | const |
Writes a description of the bounding volume containing the bottom node and all of its descendants to the indicated output stream.
Definition at line 5494 of file nodePath.cxx.
Writes the contents of this object to the datagram for shipping out to a Bam file.
Definition at line 6894 of file nodePath.cxx.
References Thread::get_current_thread, NodePathComponent::get_next(), NodePathComponent::get_node(), Thread::get_pipeline_stage, BamWriter::get_root_node, is_empty(), node(), and BamWriter::write_pointer().
Referenced by BillboardEffect::write_datagram(), CompassEffect::write_datagram(), and ParamNodePath::write_datagram().
void NodePath::wrt_reparent_to | ( | const NodePath & | other, |
int | sort = 0, | ||
Thread * | current_thread = Thread::get_current_thread() ) |
This functions identically to reparent_to(), except the transform on this node is also adjusted so that the node remains in the same place in world coordinates, even if it is reparented into a different coordinate system.
Definition at line 435 of file nodePath.cxx.
References get_prev_transform(), get_transform(), is_empty(), node(), reparent_to(), PandaNode::reset_prev_transform(), set_transform(), and verify_complete().
|
friend |
Definition at line 1060 of file nodePath.h.
|
friend |
Definition at line 1057 of file nodePath.h.
|
friend |
Definition at line 1059 of file nodePath.h.
|
friend |
Definition at line 1058 of file nodePath.h.
int Thread *current_thread NodePath::const |
Definition at line 706 of file nodePath.h.
Thread * NodePath::current_thread = Thread::get_current_thread()) const |
Definition at line 287 of file nodePath.h.
NodePath NodePath::get_ancestor |
Returns the nth ancestor of the path, where 0 is the NodePath itself and get_num_nodes() - 1 is get_top().
This requires iterating through the path.
Also see get_node(), which returns the same thing as a PandaNode pointer, not a NodePath.
Definition at line 207 of file nodePath.h.
NodePathCollection NodePath::get_children |
Returns the set of all child nodes of the referenced node.
Definition at line 233 of file nodePath.h.
|
inline |
If is_empty() is true, this returns a code that represents the reason why the NodePath is empty.
Definition at line 211 of file nodePath.h.
Referenced by MeshDrawer::begin(), MeshDrawer::geometry(), and MeshDrawer::link_segment().
|
inline |
Returns the name of the referenced node.
Definition at line 951 of file nodePath.h.
Referenced by PortalNode::cull_callback(), CConstrainHprInterval::priv_step(), CConstrainPosHprInterval::priv_step(), CConstrainPosInterval::priv_step(), CConstrainTransformInterval::priv_step(), and PT().
|
inline |
Returns the tag value that has been defined on this node, or the nearest ancestor node, for the indicated key.
If no value has been defined for the indicated key on any ancestor node, returns the empty string. See also get_tag().
Definition at line 928 of file nodePath.h.
PandaNode * NodePath::get_node |
Returns the nth node of the path, where 0 is the referenced (bottom) node and get_num_nodes() - 1 is the top node.
This requires iterating through the path.
Also see node(), which is a convenience function to return the same thing as get_node(0) (since the bottom node is the most important node in the NodePath, and is the one most frequently referenced).
Note that this function returns the same thing as get_ancestor(index).node().
Definition at line 204 of file nodePath.h.
Referenced by encode_to_bam_stream().
int NodePath::get_num_nodes |
Returns the number of nodes in the path.
Definition at line 204 of file nodePath.h.
Referenced by encode_to_bam_stream().
|
inline |
Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node.
The parent of a singleton NodePath is defined to be the empty NodePath.
Definition at line 242 of file nodePath.h.
Referenced by SpeedTreeNode::cull_callback(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), GraphicsEngine::do_cull(), PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), PandaFramework::event_arrow_up(), find_net_tag(), heads_up(), look_at(), premunge_scene(), CollisionLevelStateBase::prepare_collider(), CConstrainTransformInterval::priv_step(), PT(), reverse_ls(), MultitexReducer::scan(), and PipeOcclusionCullTraverser::set_scene().
NodePath::get_python_tags |
Definition at line 943 of file nodePath.h.
int NodePath::get_sort |
Returns the sort value of the referenced node within its parent; that is, the sort number passed on the last reparenting operation for this node.
This will control the position of the node within its parent's list of children.
Definition at line 243 of file nodePath.h.
NodePathCollection NodePath::get_stashed_children |
Returns the set of all child nodes of the referenced node that have been stashed.
These children are not normally visible on the node, and do not appear in the list returned by get_children().
Definition at line 234 of file nodePath.h.
NodePath::get_tags |
Definition at line 932 of file nodePath.h.
|
inline |
Returns true if the indicated tag value has been defined on this node or on any ancestor node, or false otherwise.
See also has_tag().
Definition at line 928 of file nodePath.h.
|
inline |
Returns true if the referenced node has a parent; i.e.
the NodePath chain contains at least two nodes.
Definition at line 242 of file nodePath.h.
Referenced by PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), PandaFramework::event_arrow_up(), premunge_scene(), and reverse_ls().
|
inline |
Changes the name of the referenced node.
Definition at line 951 of file nodePath.h.
Referenced by PfmTrans::process_pfm().