|
|
|
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level interface for manipulating the scene graph.
More...
#include "nodePath.h"
List of all members.
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 string &top_node_name, Thread *current_thread=Thread::get_current_thread()) |
| | This constructs a new NodePath with a single node.
|
| | 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 NodePath ©) |
| | NodePath (PandaNode *node, Thread *current_thread=Thread::get_current_thread()) |
| | This constructs a NodePath for the indicated node.
|
| 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 (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.
|
| NodePath | attach_new_node (const 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.
|
| bool | calc_tight_bounds (LPoint3f &min_point, LPoint3f &max_point, 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_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 (const NodePath &clip_plane) |
| | Removes any reference to the indicated clipping plane from the NodePath.
|
| 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_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_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_normal_map () |
| | Undoes the effect of a previous call to set_normal_map().
|
| 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 (InternalName *id) |
|
void | clear_shader_input (const string &id) |
| void | clear_tag (const 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 (TextureStage *stage) |
| | Removes the TexProjectorEffect for the indicated stage from this node.
|
| void | clear_tex_projector () |
| | Removes the TexProjectorEffect for all stages 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 (Thread *current_thread=Thread::get_current_thread()) |
| | Sets the transform object on this node to identity.
|
| 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_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.
|
| void | compose_color_scale (const LVecBase4f &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 (float sx, float sy, float sz, float 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 (TransformState) get_transform(const NodePath &other |
|
| CPT (TransformState) get_net_transform(Thread *current_thread |
|
| CPT (TransformState) get_prev_transform(const NodePath &other |
|
| CPT (TransformState) get_tex_transform(TextureStage *stage) const |
|
| CPT (TransformState) get_net_prev_transform(Thread *current_thread |
|
| CPT (TransformState) get_tex_transform(const NodePath &other |
|
| CPT (RenderState) get_state(const NodePath &other |
|
| CPT (RenderState) get_net_state(Thread *current_thread |
| 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, float 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, float 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, float offset) |
| | Performs a billboard-type rotate to the indicated camera node, one time only, and leaves the object rotated.
|
| string | 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 (string &data, BamWriter *writer=NULL) const |
| | Converts the NodePath object into a single stream of data using a BamWriter, and stores that data in the indicated string.
|
| NodePath | find (const string &path) const |
| | Searches for a node below the referenced node that matches the indicated string.
|
| NodePathCollection | find_all_matches (const 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 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 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 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 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.
|
| TextureCollection | find_all_textures () const |
| | Returns a list of a textures applied to geometry at this node and below.
|
| 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 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 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 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 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 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 () |
| | 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.
|
| 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 () |
| | Forces the recomputing of all the bounding volumes at every node in the subgraph beginning at this node and below.
|
| NodePath | get_ancestor (int index, Thread *current_thread=Thread::get_current_thread()) const |
| | Returns the nth ancestor of the path, where 0 is the NodePath itself and get_num_nodes() - 1 is get_top().
|
| 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.
|
| float | 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.
|
| 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 |
| | Returns the set of all child nodes of the referenced node.
|
| CollideMask | get_collide_mask () const |
| | Returns the union of all of the into_collide_masks for nodes at this level and below.
|
| Colorf | get_color () const |
| | Returns the color that has been assigned to the node, or black if no color has been assigned.
|
| const LVecBase4f & | 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.
|
| float | 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 |
| | If is_empty() is true, this returns a code that represents the reason why the NodePath is empty.
|
| Fog * | get_fog () const |
| | Returns the fog that has been set on this particular node, or NULL if no fog has been set.
|
|
float | get_h (const NodePath &other) const |
|
float | get_h () 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).
|
| LVecBase3f | get_hpr (const NodePath &other) const |
| | Returns the relative orientation of the bottom node as seen from the other node.
|
| LVecBase3f | get_hpr () const |
| | Retrieves the rotation component of the transform.
|
| const 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.
|
| const LMatrix4f & | 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.
|
| LMatrix4f | 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.
|
| string | get_name () const |
| | Returns the name of the referenced node.
|
| float | get_net_audio_volume () const |
| | Returns the complete audio volume for this node taking highers nodes in the graph into account.
|
| string | get_net_tag (const string &key) const |
| | Returns the tag value that has been defined on this node, or the nearest ancestor node, for the indicated key.
|
| PandaNode * | get_node (int index, Thread *current_thread=Thread::get_current_thread()) const |
| | Returns the nth node of the path, where 0 is the referenced (bottom) node and get_num_nodes() - 1 is the top node.
|
| 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 |
| | Returns the number of nodes in the path.
|
|
float | get_p (const NodePath &other) const |
|
float | get_p () const |
| NodePath | get_parent (Thread *current_thread=Thread::get_current_thread()) const |
| | Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node.
|
| LPoint3f | get_pos (const NodePath &other) const |
| | Returns the relative position of the referenced node as seen from the other node.
|
| LPoint3f | get_pos () const |
| | Retrieves the translation component of the transform.
|
| LVector3f | 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.
|
| LVector3f | 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.
|
| 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.
|
| LQuaternionf | get_quat (const NodePath &other) const |
| | Returns the relative orientation of the bottom node as seen from the other node.
|
| LQuaternionf | get_quat () const |
| | Retrieves the rotation component of the transform.
|
|
float | get_r (const NodePath &other) const |
|
float | get_r () const |
| LPoint3f | get_relative_point (const NodePath &other, const LVecBase3f &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.
|
| LVector3f | get_relative_vector (const NodePath &other, const LVecBase3f &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.
|
| float | 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.
|
| float | get_sa () const |
| | Gets the alpha scale component of the transform.
|
| float | get_sb () const |
| | Gets the blue scale component of the transform.
|
| LVecBase3f | get_scale (const NodePath &other) const |
| | Returns the relative scale of the bottom node as seen from the other node.
|
| LVecBase3f | get_scale () const |
| | Retrieves the scale component of the transform.
|
| float | get_sg () const |
| | Gets the green scale component of the transform.
|
|
const Shader * | get_shader () const |
|
const ShaderInput * | get_shader_input (const string &id) const |
|
const ShaderInput * | get_shader_input (InternalName *id) const |
| LVecBase3f | get_shear (const NodePath &other) const |
| | Returns the relative shear of the bottom node as seen from the other node.
|
| LVecBase3f | get_shear () const |
| | Retrieves the shear component of the transform.
|
| float | get_shxy (const NodePath &other) const |
| | Returns the relative shear of the referenced node as seen from the other node.
|
|
float | get_shxy () const |
|
float | get_shxz (const NodePath &other) const |
|
float | get_shxz () const |
|
float | get_shyz (const NodePath &other) const |
|
float | get_shyz () const |
| int | get_sort (Thread *current_thread=Thread::get_current_thread()) const |
| | 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.
|
| float | get_sr () const |
| | Gets the red scale component of the transform.
|
| 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 |
| | Returns the set of all child nodes of the referenced node that have been stashed.
|
| const RenderState * | get_state (Thread *current_thread=Thread::get_current_thread()) const |
| | Returns the complete state object set on this node.
|
| float | get_sx (const NodePath &other) const |
| | Returns the relative scale of the referenced node as seen from the other node.
|
|
float | get_sx () const |
|
float | get_sy (const NodePath &other) const |
|
float | get_sy () const |
|
float | get_sz (const NodePath &other) const |
|
float | get_sz () const |
| string | get_tag (const string &key) const |
| | Retrieves the user-defined value that was previously set on this node for the particular key, if any.
|
| 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.
|
| NodePath | get_tex_gen_light (TextureStage *stage) const |
| | Returns the particular Light set for the indicated texgen mode's texture stage, or empty NodePath if no light is set.
|
| LVecBase3f | get_tex_hpr (TextureStage *stage) const |
| | Returns the 3-D HPR set for the UVW's for the given stage on the current node.
|
| LVecBase3f | 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.
|
| LVecBase2f | get_tex_offset (TextureStage *stage) const |
| | Returns the offset set for the UV's for the given stage on the current node.
|
| LVecBase2f | 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.
|
| LVecBase3f | get_tex_pos (TextureStage *stage) const |
| | Returns the offset set for the UVW's for the given stage on the current node.
|
| LVecBase3f | 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.
|
| 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.
|
| float | get_tex_rotate (TextureStage *stage) const |
| | Returns the rotation set for the UV's for the given stage on the current node.
|
| float | 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.
|
| LVecBase2f | get_tex_scale (TextureStage *stage) const |
| | Returns the scale set for the UV's for the given stage on the current node.
|
| LVecBase2f | 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.
|
| LVecBase3f | get_tex_scale_3d (TextureStage *stage) const |
| | Returns the scale set for the UVW's for the given stage on the current node.
|
| LVecBase3f | 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.
|
| 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.
|
| 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.
|
|
float | get_x (const NodePath &other) const |
|
float | get_x () const |
|
float | get_y (const NodePath &other) const |
|
float | get_y () const |
|
float | get_z (const NodePath &other) const |
|
float | get_z () 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 NodePath &light) const |
| | Returns true if the indicated Light has been specifically disabled on this particular node.
|
| bool | has_light_off () const |
| | Returns true if all Lights have been specifically disabled on this particular node.
|
| 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 string &key) const |
| | Returns true if the indicated tag value has been defined on this node or on any ancestor node, or false otherwise.
|
| bool | has_parent (Thread *current_thread=Thread::get_current_thread()) const |
| | Returns true if the referenced node has a parent; i.e.
|
| 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 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 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 (float x, float y, float z) |
| | Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
|
| void | heads_up (const LPoint3f &point, const LVector3f &up=LVector3f::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, float x, float y, float z) |
| | 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 LPoint3f &point=LPoint3f(0.0, 0.0, 0.0), const LVector3f &up=LVector3f::up()) |
| | Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
|
| void | hide (DrawMask camera_mask) |
| | Makes the referenced node invisible just to the cameras whose camera_mask shares the indicated bits.
|
| void | hide () |
| | Makes the referenced node (and the entire subgraph below this node) invisible to all cameras.
|
| 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 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 (float x, float y, float z) |
| | Sets the transform on this NodePath so that it rotates to face the indicated point in space.
|
| void | look_at (const LPoint3f &point, const LVector3f &up=LVector3f::up()) |
| | Sets the hpr on this NodePath so that it rotates to face the indicated point in space.
|
| void | look_at (const NodePath &other, float x, float y, float 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 (const NodePath &other, const LPoint3f &point=LPoint3f(0.0, 0.0, 0.0), const LVector3f &up=LVector3f::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 | ls () const |
| | Lists the hierarchy at and below the referenced node.
|
| void | ls (ostream &out, int indent_level=0) const |
| | Lists the hierarchy at and below the referenced node.
|
|
| MAKE_SEQ (get_ancestors, get_num_nodes, get_ancestor) |
|
| MAKE_SEQ (get_nodes, get_num_nodes, get_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 NodePath &other) const |
| | Returns true if this NodePath sorts before the other one, false otherwise.
|
|
void | operator= (const NodePath ©) |
| 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.
|
| void | output (ostream &out) const |
| | Writes a sensible description of the NodePath to the indicated output stream.
|
| void | premunge_scene (GraphicsStateGuardianBase *gsg=NULL) |
| | 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 (Material) get_material() const |
|
| PT (BoundingVolume) get_bounds(Thread *current_thread |
| 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 | reverse_ls () const |
| | Lists the hierarchy at and above the referenced node.
|
| int | reverse_ls (ostream &out, int indent_level=0) const |
| | Lists the hierarchy at and above the referenced node.
|
| void | set_all_color_scale (float 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 (float 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) |
| | Adds the indicated render attribute to the scene graph on this node.
|
| void | set_audio_volume (float 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 (float 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_axis (const NodePath &camera, float 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_point_eye (float 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 top of the camera.
|
| void | set_billboard_point_eye (const NodePath &camera, float 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 top of the camera, towards a specified "camera" instead of to the viewing camera.
|
| void | set_billboard_point_world (float 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_billboard_point_world (const NodePath &camera, float 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_bin (const 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 (float r, float g, float b, float a=1.0, int priority=0) |
| | Applies a scene-graph color to the referenced node.
|
| void | set_color (const Colorf &color, 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 LVecBase4f &scale, int priority=0) |
| | Sets the color scale component of the transform, leaving translation and rotation untouched.
|
| void | set_color_scale (float sx, float sy, float sz, float 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 NodePath &other, float x, float y, float 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 (const NodePath &other, const LVecBase3f &pos) |
| | Sets the translation component of the transform, relative to the other node.
|
| void | set_fluid_pos (float x, float y, float 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 (const LVecBase3f &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_x (const NodePath &other, float x) |
|
void | set_fluid_x (float x) |
|
void | set_fluid_y (const NodePath &other, float y) |
|
void | set_fluid_y (float y) |
|
void | set_fluid_z (const NodePath &other, float z) |
|
void | set_fluid_z (float 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, float h) |
|
void | set_h (float h) |
| void | set_hpr (const NodePath &other, float h, float p, float r) |
| | Sets the rotation component of the transform, relative to the other node.
|
| void | set_hpr (const NodePath &other, const LVecBase3f &hpr) |
| | Sets the rotation component of the transform, relative to the other node.
|
| void | set_hpr (const LVecBase3f &hpr) |
| | Sets the rotation component of the transform, leaving translation and scale untouched.
|
| void | set_hpr (float h, float p, float r) |
| | Sets the rotation component of the transform, leaving translation and scale untouched.
|
| void | set_hpr_scale (const NodePath &other, const LVecBase3f &hpr, const LVecBase3f &scale) |
| | Sets the rotation and scale components of the transform, leaving translation untouched.
|
| void | set_hpr_scale (const NodePath &other, float h, float p, float r, float sx, float sy, float sz) |
| | Sets the rotation and scale components of the transform, leaving translation untouched.
|
| void | set_hpr_scale (float h, float p, float r, float sx, float sy, float sz) |
| | Sets the rotation and scale components of the transform, leaving translation untouched.
|
| void | set_hpr_scale (const LVecBase3f &hpr, const LVecBase3f &scale) |
| | 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 (int priority=0) |
| | Sets the geometry at this level and below to render using no lights at all.
|
| 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_mat (const NodePath &other, const LMatrix4f &mat) |
| | Converts the indicated matrix from the other's coordinate space to the local coordinate space, and applies it to the node.
|
| void | set_mat (const LMatrix4f &mat) |
| | Directly sets an arbitrary 4x4 transform matrix.
|
| 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 string &name) |
| | Changes the name of the referenced node.
|
| void | set_normal_map (Texture *normal_map, const string &texcoord_name=string(), bool preserve_color=false) |
| | A convenience function to set up a normal map on this geometry.
|
|
void | set_p (float p) |
|
void | set_p (const NodePath &other, float p) |
| void | set_pos (const NodePath &other, float x, float y, float z) |
| | Sets the translation component of the transform, relative to the other node.
|
| void | set_pos (const NodePath &other, const LVecBase3f &pos) |
| | Sets the translation component of the transform, relative to the other node.
|
| void | set_pos (const LVecBase3f &pos) |
| | Sets the translation component of the transform, leaving rotation and scale untouched.
|
| void | set_pos (float x, float y, float z) |
| | Sets the translation component of the transform, leaving rotation and scale untouched.
|
| void | set_pos_hpr (const NodePath &other, const LVecBase3f &pos, const LVecBase3f &hpr) |
| | Sets the translation and rotation component of the transform, relative to the other node.
|
| void | set_pos_hpr (const NodePath &other, float x, float y, float z, float h, float p, float r) |
| | Sets the translation and rotation component of the transform, relative to the other node.
|
| void | set_pos_hpr (float x, float y, float z, float h, float p, float r) |
| | Sets the translation and rotation component of the transform, leaving scale untouched.
|
| void | set_pos_hpr (const LVecBase3f &pos, const LVecBase3f &hpr) |
| | Sets the translation and rotation component of the transform, leaving scale untouched.
|
| void | set_pos_hpr_scale (float x, float y, float z, float h, float p, float r, float sx, float sy, float sz) |
| | Completely replaces the transform with new translation, rotation, and scale components.
|
| void | set_pos_hpr_scale (const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale) |
| | Replaces the translation, rotation, and scale components, implicitly setting shear to 0.
|
| void | set_pos_hpr_scale (const NodePath &other, float x, float y, float z, float h, float p, float r, float sx, float sy, float sz) |
| | Completely replaces the transform with new translation, rotation, and scale components, relative to the other node.
|
| void | set_pos_hpr_scale (const NodePath &other, const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &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_shear (const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale, const LVecBase3f &shear) |
| | Completely replaces the transform with new translation, rotation, scale, and shear components.
|
| void | set_pos_hpr_scale_shear (const NodePath &other, const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale, const LVecBase3f &shear) |
| | Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node.
|
| void | set_pos_quat (const NodePath &other, const LVecBase3f &pos, const LQuaternionf &quat) |
| | Sets the translation and rotation component of the transform, relative to the other node.
|
| void | set_pos_quat (const LVecBase3f &pos, const LQuaternionf &quat) |
| | Sets the translation and rotation component of the transform, leaving scale untouched.
|
| void | set_pos_quat_scale (const LVecBase3f &pos, const LQuaternionf &quat, const LVecBase3f &scale) |
| | Replaces the translation, rotation, and scale components, implicitly setting shear to 0.
|
| void | set_pos_quat_scale (const NodePath &other, const LVecBase3f &pos, const LQuaternionf &quat, const LVecBase3f &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 LVecBase3f &pos, const LQuaternionf &quat, const LVecBase3f &scale, const LVecBase3f &shear) |
| | Completely replaces the transform with new translation, rotation, scale, and shear components.
|
| void | set_pos_quat_scale_shear (const NodePath &other, const LVecBase3f &pos, const LQuaternionf &quat, const LVecBase3f &scale, const LVecBase3f &shear) |
| | Completely replaces the transform with new translation, rotation, scale, and shear components, relative to the other node.
|
| void | set_prev_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
| | Sets the transform that represents this node's "previous" position, one frame ago, for the purposes of detecting motion for accurate collision calculations.
|
| void | set_prev_transform (const NodePath &other, const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
| | Sets the "previous" transform object on this node, relative to the other node.
|
| void | set_quat (const LQuaternionf &quat) |
| | Sets the rotation component of the transform, leaving translation and scale untouched.
|
| void | set_quat (const NodePath &other, const LQuaternionf &quat) |
| | Sets the rotation component of the transform, relative to the other node.
|
| void | set_quat_scale (const LQuaternionf &quat, const LVecBase3f &scale) |
| | Sets the rotation and scale components of the transform, leaving translation untouched.
|
| void | set_quat_scale (const NodePath &other, const LQuaternionf &quat, const LVecBase3f &scale) |
| | Sets the rotation and scale components of the transform, leaving translation untouched.
|
|
void | set_r (float r) |
|
void | set_r (const NodePath &other, float r) |
| void | set_render_mode (RenderModeAttrib::Mode mode, float 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_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 (float 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 (float sa) |
| | Sets the alpha scale component of the transform.
|
| void | set_sb (float sb) |
| | Sets the blue scale component of the transform.
|
|
void | set_scale (float sx, float sy, float sz) |
| void | set_scale (float scale) |
| | Sets the scale component of the transform, leaving translation and rotation untouched.
|
| void | set_scale (const NodePath &other, float sx, float sy, float sz) |
| | Sets the scale component of the transform, relative to the other node.
|
| void | set_scale (const NodePath &other, float scale) |
| | Sets the scale component of the transform, relative to the other node.
|
| void | set_scale (const LVecBase3f &scale) |
| | Sets the scale component of the transform, leaving translation and rotation untouched.
|
| void | set_scale (const NodePath &other, const LVecBase3f &scale) |
| | Sets the scale component of the transform, relative to the other node.
|
| void | set_scissor (const NodePath &other, const LPoint3f &a, const LPoint3f &b) |
| | Sets up a scissor region on the nodes rendered at this level and below.
|
| void | set_scissor (const NodePath &other, const LPoint3f &a, const LPoint3f &b, const LPoint3f &c, const LPoint3f &d) |
| | Sets up a scissor region on the nodes rendered at this level and below.
|
| void | set_scissor (const LPoint3f &a, const LPoint3f &b, const LPoint3f &c, const LPoint3f &d) |
| | Sets up a scissor region on the nodes rendered at this level and below.
|
| void | set_scissor (float left, float right, float bottom, float top) |
| | Sets up a scissor region on the nodes rendered at this level and below.
|
| void | set_scissor (const LPoint3f &a, const LPoint3f &b) |
| | Sets up a scissor region on the nodes rendered at this level and below.
|
| void | set_sg (float sg) |
| | Sets the alpha scale component of the transform.
|
|
void | set_shader (const Shader *sha, int priority=0) |
|
void | set_shader_auto (int priority=0) |
|
void | set_shader_input (InternalName *id, const LVector4f &v, int priority=0) |
|
void | set_shader_input (const string &id, Texture *tex, int priority=0) |
|
void | set_shader_input (InternalName *id, const NodePath &np, int priority=0) |
|
void | set_shader_input (const string &id, const LVector4f &v, int priority=0) |
|
void | set_shader_input (const string &id, double n1=0, double n2=0, double n3=0, double n4=1, int priority=0) |
|
void | set_shader_input (InternalName *id, Texture *tex, int priority=0) |
|
void | set_shader_input (InternalName *id, double n1=0, double n2=0, double n3=0, double n4=1, int priority=0) |
|
void | set_shader_input (const ShaderInput *inp) |
|
void | set_shader_input (const string &id, const NodePath &np, int priority=0) |
|
void | set_shader_off (int priority=0) |
| void | set_shear (const LVecBase3f &shear) |
| | Sets the shear component of the transform, leaving translation and rotation untouched.
|
| void | set_shear (const NodePath &other, const LVecBase3f &shear) |
| | Sets the shear component of the transform, relative to the other node.
|
| void | set_shear (const NodePath &other, float shxy, float shxz, float shyz) |
| | Sets the shear component of the transform, relative to the other node.
|
| void | set_shear (float shxy, float shxz, float shyz) |
| | Sets the shear component of the transform, leaving translation, rotation, and scale untouched.
|
|
void | set_shxy (float shxy) |
|
void | set_shxy (const NodePath &other, float shxy) |
|
void | set_shxz (const NodePath &other, float shxz) |
|
void | set_shxz (float shxz) |
|
void | set_shyz (float shyz) |
|
void | set_shyz (const NodePath &other, float shyz) |
| void | set_sr (float sr) |
| | Sets the red scale component of the transform.
|
| void | set_state (const NodePath &other, const RenderState *state, Thread *current_thread=Thread::get_current_thread()) |
| | Sets the state object on this node, relative to the other node.
|
| void | set_state (const RenderState *state, Thread *current_thread=Thread::get_current_thread()) |
| | Changes the complete state object on this node.
|
|
void | set_sx (float sx) |
|
void | set_sx (const NodePath &other, float sx) |
|
void | set_sy (float sy) |
|
void | set_sy (const NodePath &other, float sy) |
|
void | set_sz (float sz) |
|
void | set_sz (const NodePath &other, float sz) |
| void | set_tag (const string &key, const string &value) |
| | Associates a user-defined value with a user-defined key which is stored on the node.
|
| void | set_tex_gen (TextureStage *stage, RenderAttrib::TexGenMode mode, const TexCoord3f &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) |
| | Enables automatic texture coordinate generation for the indicated texture stage.
|
| void | set_tex_gen (TextureStage *stage, RenderAttrib::TexGenMode mode, const string &source_name, const NodePath &light, int priority=0) |
| | Enables automatic texture coordinate generation for the indicated texture stage.
|
| void | set_tex_hpr (TextureStage *stage, float h, float p, float 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 LVecBase3f &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, const LVecBase3f &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, float h, float p, float 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, float u, float 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 LVecBase2f &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, float u, float 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 (const NodePath &other, TextureStage *stage, const LVecBase2f &uv) |
| | Sets a texture matrix on the current node to apply the indicated offset to UV's for the given stage.
|
| void | set_tex_pos (TextureStage *stage, const LVecBase3f &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, float u, float v, float 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 (const NodePath &other, TextureStage *stage, float u, float v, float 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 (const NodePath &other, TextureStage *stage, const LVecBase3f &uvw) |
| | 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) |
| | 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, float 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, float 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 (TextureStage *stage, const LVecBase2f &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 LVecBase2f &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, float 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, float 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 LVecBase3f &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, float su, float sv, float 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 LVecBase3f &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, float su, float 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, float su, float 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, float su, float sv, float 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 (TextureStage *stage, const TransformState *transform) |
| | Sets the texture matrix on the current node to the indicated transform for the given stage.
|
| void | set_tex_transform (const NodePath &other, TextureStage *stage, const TransformState *transform) |
| | Sets the texture matrix on the current node to the indicated transform for the given 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 (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_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_texture_off (int priority=0) |
| | Sets the geometry at this level and below to render using no texture, on any stage.
|
| void | set_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
| | Changes the complete transform object on this node.
|
| void | set_transform (const NodePath &other, const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
| | Sets the transform object on this node, relative to the other 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 (float x) |
|
void | set_x (const NodePath &other, float x) |
|
void | set_y (float y) |
|
void | set_y (const NodePath &other, float y) |
|
void | set_z (const NodePath &other, float z) |
|
void | set_z (float z) |
| void | show (DrawMask camera_mask) |
| | Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.
|
| 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_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 (ostream &out) const |
| | Writes the contents of this node and below out to the indicated stream.
|
| void | write_bounds (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 | 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 (const string &data, BamReader *reader=NULL) |
| | 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 |
Friends |
|
class | NodePathCollection |
|
class | WeakNodePath |
|
class | WorkingNodePath |
Detailed Description
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 150 of file nodePath.h.
Constructor & Destructor Documentation
| NodePath::NodePath |
( |
| ) |
[inline] |
This constructs an empty NodePath with no nodes.
Definition at line 22 of file nodePath.I.
Referenced by decode_from_bam_stream(), get_child(), get_parent(), get_tex_gen_light(), project_texture(), set_billboard_axis(), set_billboard_point_eye(), set_billboard_point_world(), set_normal_map(), set_tex_transform(), and set_transform().
| NodePath::NodePath |
( |
const string & |
top_node_name, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline] |
| NodePath::NodePath |
( |
PandaNode * |
node, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline] |
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 57 of file nodePath.I.
References Thread::get_pipeline_stage().
| NodePath::NodePath |
( |
const NodePath & |
parent, |
|
|
PandaNode * |
child_node, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
Member Function Documentation
| void NodePath::adjust_all_priorities |
( |
int |
adjustment | ) |
[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 1874 of file nodePath.I.
References is_empty(), and node().
| NodePath NodePath::any_path |
( |
PandaNode * |
node, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline, static] |
| 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 6531 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), is_empty(), and node().
| 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 876 of file nodePath.cxx.
References fail(), Thread::get_pipeline_stage(), and verify_complete().
Referenced by NonlinearImager::add_viewer(), attach_new_node(), PGEntry::clear_cursor_def(), copy_to(), MouseWatcherGroup::do_show_regions(), ModelFlattenRequest::do_task(), MayaPview::doIt(), PortalNode::enable_clipping_planes(), WindowFramework::enable_keyboard(), MultitexReducer::flatten(), GeoMipTerrain::generate(), PGFrameStyle::generate_into(), WindowFramework::get_aspect_2d(), WindowFramework::get_camera_group(), WindowFramework::get_mouse(), PandaFramework::get_mouse(), WindowFramework::get_render_2d(), SmoothMover::handle_wrt_reparent(), instance_under_node(), WindowFramework::load_default_model(), WindowFramework::load_model(), WindowFramework::make_camera(), GraphicsOutput::make_cube_map(), PGButton::setup(), WindowFramework::setup_lights(), PGEntry::setup_minimal(), WindowFramework::setup_trackball(), SceneGraphAnalyzerMeter::setup_window(), FrameRateMeter::setup_window(), and PathFollow::start().
| NodePath NodePath::attach_new_node |
( |
const string & |
name, |
|
|
int |
sort = 0, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const [inline] |
| bool NodePath::calc_tight_bounds |
( |
LPoint3f & |
min_point, |
|
|
LPoint3f & |
max_point, |
|
|
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 return value is true if any points are within the bounding volume, or false if none are.
Definition at line 6356 of file nodePath.cxx.
References is_empty(), and node().
Referenced by TextPropertiesManager::set_graphic(), and PGButton::setup().
| void NodePath::clear_antialias |
( |
| ) |
|
| void NodePath::clear_attrib |
( |
TypeHandle |
type | ) |
[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 550 of file nodePath.I.
References PandaNode::clear_attrib(), 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 5928 of file nodePath.cxx.
References PandaNode::clear_attrib(), is_empty(), and node().
| void NodePath::clear_billboard |
( |
| ) |
|
| void NodePath::clear_bin |
( |
| ) |
|
| void NodePath::clear_clip_plane |
( |
| ) |
|
| void NodePath::clear_clip_plane |
( |
const NodePath & |
clip_plane | ) |
|
| 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 2468 of file nodePath.cxx.
References PandaNode::clear_attrib(), 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 2533 of file nodePath.cxx.
References PandaNode::clear_attrib(), is_empty(), and node().
| void NodePath::clear_compass |
( |
| ) |
|
| void NodePath::clear_depth_offset |
( |
| ) |
|
| void NodePath::clear_depth_test |
( |
| ) |
|
| void NodePath::clear_depth_write |
( |
| ) |
|
| void NodePath::clear_effect |
( |
TypeHandle |
type | ) |
[inline] |
| void NodePath::clear_effects |
( |
| ) |
[inline] |
| void NodePath::clear_fog |
( |
| ) |
|
| void NodePath::clear_light |
( |
| ) |
|
| void NodePath::clear_light |
( |
const NodePath & |
light | ) |
|
Removes any reference to the indicated Light or PolylightNode from the NodePath.
Definition at line 2853 of file nodePath.cxx.
References PandaNode::as_light(), PandaNode::clear_attrib(), PandaNode::get_attrib(), PandaNode::get_effect(), RenderState::get_override(), PandaNode::get_state(), is_empty(), TypedObject::is_of_type(), node(), PandaNode::set_attrib(), and PandaNode::set_effect().
| void NodePath::clear_mat |
( |
| ) |
[inline] |
| void NodePath::clear_material |
( |
| ) |
|
| int NodePath::clear_model_nodes |
( |
| ) |
[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 2122 of file nodePath.I.
References is_empty(), and node().
| void NodePath::clear_normal_map |
( |
| ) |
|
| void NodePath::clear_project_texture |
( |
TextureStage * |
stage | ) |
[inline] |
| void NodePath::clear_render_mode |
( |
| ) |
|
| void NodePath::clear_scissor |
( |
| ) |
|
| void NodePath::clear_tag |
( |
const string & |
key | ) |
[inline] |
| void NodePath::clear_tex_gen |
( |
| ) |
|
| void NodePath::clear_tex_projector |
( |
| ) |
|
| void NodePath::clear_tex_transform |
( |
| ) |
|
| void NodePath::clear_texture |
( |
| ) |
|
| void NodePath::clear_transform |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
[inline] |
| void NodePath::clear_transform |
( |
const NodePath & |
other, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [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 671 of file nodePath.I.
References set_transform().
| void NodePath::clear_transparency |
( |
| ) |
|
| void NodePath::clear_two_sided |
( |
| ) |
|
| int NodePath::compare_to |
( |
const NodePath & |
other | ) |
const [inline] |
| void NodePath::compose_color_scale |
( |
const LVecBase4f & |
scale, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::compose_color_scale |
( |
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz, |
|
|
float |
sa, |
|
|
int |
priority = 0 |
|
) |
| [inline] |
| NodePath NodePath::copy_to |
( |
const NodePath & |
other, |
|
|
int |
sort = 0, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const |
| int NodePath::count_num_descendants |
( |
| ) |
const [inline] |
Returns the number of nodes at and below this level.
Definition at line 373 of file nodePath.I.
References is_empty().
| NodePath NodePath::decode_from_bam_stream |
( |
const string & |
data, |
|
|
BamReader * |
reader = NULL |
|
) |
| [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 6719 of file nodePath.cxx.
References fail(), DatagramInputFile::get_datagram(), DatagramIterator::get_int32(), DatagramIterator::get_uint8(), TypedObject::is_of_type(), node(), NodePath(), DatagramInputFile::open(), DatagramInputFile::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 957 of file nodePath.cxx.
References Thread::get_pipeline_stage(), is_empty(), is_singleton(), node(), and PandaNode::reset_prev_transform().
Referenced by PandaFramework::clear_highlight(), NodePathCollection::detach(), and SmoothMover::handle_wrt_reparent().
| void NodePath::do_billboard_axis |
( |
const NodePath & |
camera, |
|
|
float |
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 5574 of file nodePath.cxx.
References get_parent(), LMatrix4f::get_row3(), get_transform(), heads_up(), is_empty(), LVecBase3f::normalize(), set_pos(), set_quat(), and LVector3f::up().
| void NodePath::do_billboard_point_eye |
( |
const NodePath & |
camera, |
|
|
float |
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 5607 of file nodePath.cxx.
References LVector3f::forward(), get_parent(), LMatrix4f::get_row3(), get_transform(), is_empty(), look_at(), LVecBase3f::normalize(), set_pos(), set_quat(), and LVector3f::up().
| void NodePath::do_billboard_point_world |
( |
const NodePath & |
camera, |
|
|
float |
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 5638 of file nodePath.cxx.
References get_parent(), LMatrix4f::get_row3(), get_transform(), is_empty(), look_at(), LVecBase3f::normalize(), set_pos(), set_quat(), and LVector3f::up().
| string NodePath::encode_to_bam_stream |
( |
| ) |
const [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 2377 of file nodePath.I.
| bool NodePath::encode_to_bam_stream |
( |
string & |
data, |
|
|
BamWriter * |
writer = NULL |
|
) |
| 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 6655 of file nodePath.cxx.
References Datagram::add_int32(), Datagram::add_uint8(), get_node(), get_num_nodes(), node(), DatagramOutputFile::open(), DatagramOutputFile::put_datagram(), BamWriter::set_target(), DatagramOutputFile::write_header(), and BamWriter::write_object().
| NodePath NodePath::fail |
( |
| ) |
[inline, static] |
Creates a NodePath with the ET_fail error type set.
Definition at line 145 of file nodePath.I.
Referenced by attach_new_node(), copy_to(), decode_from_bam_stream(), find(), find_path_to(), get_ancestor(), TexProjectorEffect::get_from(), PhysxActor::get_node_path(), WorkingNodePath::get_node_path(), WeakNodePath::get_node_path(), LightAttrib::get_off_light(), ClipPlaneAttrib::get_off_plane(), LightAttrib::get_on_light(), ClipPlaneAttrib::get_on_plane(), get_tex_gen_light(), get_tex_projector_from(), get_tex_projector_to(), TexProjectorEffect::get_to(), get_top(), and instance_to().
| NodePath NodePath::find |
( |
const string & |
path | ) |
const |
| Material * NodePath::find_material |
( |
const 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 4852 of file nodePath.cxx.
References is_empty(), and node().
| NodePath NodePath::find_net_tag |
( |
const string & |
key | ) |
const |
| Texture * NodePath::find_texture |
( |
const 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 4677 of file nodePath.cxx.
References is_empty(), and node().
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 4692 of file nodePath.cxx.
References is_empty(), and node().
| TextureStage * NodePath::find_texture_stage |
( |
const 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 4775 of file nodePath.cxx.
References is_empty(), and node().
| *int NodePath::flatten_light |
( |
| ) |
|
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 6437 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), is_empty(), and node().
| 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 6462 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 6495 of file nodePath.cxx.
References SceneGraphReducer::apply_attribs(), SceneGraphReducer::collect_vertex_data(), SceneGraphReducer::flatten(), is_empty(), SceneGraphReducer::make_compatible_state(), node(), and SceneGraphReducer::unify().
Referenced by ModelFlattenRequest::do_task().
| void NodePath::force_recompute_bounds |
( |
| ) |
|
Forces the recomputing of all the bounding volumes at every node in the subgraph beginning at this node and below.
This should not normally need to be called, since the bounding volumes are supposed to be recomputed automatically when necessary. It may be useful when debugging, to verify that the bounding volumes have not become inadvertently stale; it may also be useful to force animated characters to update their bounding volumes (which does not presently happen automatically).
Definition at line 6326 of file nodePath.cxx.
References is_empty(), and node().
| NodePath NodePath::get_ancestor |
( |
int |
index, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const |
| unsigned short NodePath::get_antialias |
( |
| ) |
const |
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 523 of file nodePath.I.
References PandaNode::get_attrib(), is_empty(), and node().
| float NodePath::get_audio_volume |
( |
| ) |
const |
| int NodePath::get_bin_draw_order |
( |
| ) |
const |
| string NodePath::get_bin_name |
( |
| ) |
const |
| NodePath NodePath::get_child |
( |
int |
n, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const [inline] |
| CollideMask NodePath::get_collide_mask |
( |
| ) |
const [inline] |
| Colorf NodePath::get_color |
( |
| ) |
const |
| const LVecBase4f & 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 2690 of file nodePath.cxx.
References PandaNode::get_attrib(), ColorScaleAttrib::get_scale(), is_empty(), and node().
Referenced by get_sa(), get_sb(), get_sg(), get_sr(), set_sa(), set_sb(), set_sg(), and set_sr().
| NodePath NodePath::get_common_ancestor |
( |
const NodePath & |
other, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const [inline] |
| int NodePath::get_depth_offset |
( |
| ) |
const |
| bool NodePath::get_depth_test |
( |
| ) |
const |
| bool NodePath::get_depth_write |
( |
| ) |
const |
| float NodePath::get_distance |
( |
const NodePath & |
other | ) |
const [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 1152 of file nodePath.I.
References get_pos().
| NodePath::ErrorType NodePath::get_error_type |
( |
| ) |
const [inline] |
| Fog * NodePath::get_fog |
( |
| ) |
const |
| NodePath NodePath::get_hidden_ancestor |
( |
DrawMask |
camera_mask = PandaNode::get_overall_bit(), |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const |
| const int NodePath::get_instance_count |
( |
| ) |
const |
| int NodePath::get_key |
( |
| ) |
const [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 267 of file nodePath.I.
References is_empty().
Referenced by remove_node().
| const LMatrix4f & NodePath::get_mat |
( |
| ) |
const [inline] |
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 2320 of file nodePath.cxx.
References get_transform().
| int NodePath::get_max_search_depth |
( |
| ) |
[inline, static] |
Returns the current setting of the search depth limit.
See set_max_search_depth.
Definition at line 186 of file nodePath.I.
| string NodePath::get_name |
( |
| ) |
const [inline] |
| float NodePath::get_net_audio_volume |
( |
| ) |
const |
| string NodePath::get_net_tag |
( |
const string & |
key | ) |
const [inline] |
| PandaNode * NodePath::get_node |
( |
int |
index, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const |
| int NodePath::get_num_children |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const [inline] |
| int NodePath::get_num_nodes |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const |
| NodePath NodePath::get_parent |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const [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 400 of file nodePath.I.
References Thread::get_pipeline_stage(), has_parent(), and NodePath().
Referenced by 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(), BaseIntegrator::precompute_angular_matrices(), BaseIntegrator::precompute_linear_matrices(), premunge_scene(), CollisionLevelStateBase::prepare_collider(), CConstrainTransformInterval::priv_step(), reverse_ls(), MultitexReducer::scan(), PandaFramework::set_highlight(), PipeOcclusionCullTraverser::set_scene(), set_tex_transform(), and set_transform().
Retrieves the translation component of the transform.
Definition at line 1332 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(), CollisionHandlerFluidPusher::handle_entries(), SmoothMover::handle_wrt_reparent(), heads_up(), CDistributedSmoothNodeBase::initialize(), look_at(), ObstacleAvoidance::obstacle_detection(), PathFind::path_find(), CConstrainPosInterval::priv_step(), CConstrainPosHprInterval::priv_step(), set_fluid_pos(), set_pos(), and AICharacter::update().
| const TransformState * NodePath::get_prev_transform |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const |
| RenderModeAttrib::Mode NodePath::get_render_mode |
( |
| ) |
const |
| bool NodePath::get_render_mode_perspective |
( |
| ) |
const |
| float NodePath::get_render_mode_thickness |
( |
| ) |
const |
| float NodePath::get_sa |
( |
| ) |
const [inline] |
| float NodePath::get_sb |
( |
| ) |
const [inline] |
| float NodePath::get_sg |
( |
| ) |
const [inline] |
| float NodePath::get_shxy |
( |
const NodePath & |
other | ) |
const [inline] |
Returns the relative shear of the referenced node as seen from the other node.
Definition at line 1063 of file nodePath.I.
References get_shear().
| int NodePath::get_sort |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const |
| float NodePath::get_sr |
( |
| ) |
const [inline] |
| NodePath NodePath::get_stashed_ancestor |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const |
| 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 1001 of file nodePath.cxx.
References PandaNode::get_state(), is_empty(), and node().
Referenced by clear_normal_map(), NodePathCollection::compose_color_scale(), compose_color_scale(), CLerpNodePathInterval::priv_step(), MultitexReducer::scan(), set_all_color_scale(), set_alpha_scale(), NodePathCollection::set_attrib(), set_audio_volume(), set_clip_plane(), set_clip_plane_off(), NodePathCollection::set_color_scale(), set_color_scale(), set_light(), set_light_off(), set_tex_gen(), set_tex_transform(), NodePathCollection::set_texture(), and NodePathCollection::set_texture_off().
| float NodePath::get_sx |
( |
const NodePath & |
other | ) |
const [inline] |
Returns the relative scale of the referenced node as seen from the other node.
Definition at line 1031 of file nodePath.I.
References get_scale().
| string NodePath::get_tag |
( |
const string & |
key | ) |
const [inline] |
| RenderAttrib::TexGenMode NodePath::get_tex_gen |
( |
TextureStage * |
stage | ) |
const |
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 1516 of file nodePath.I.
References is_empty(), and LVecBase3f::zero().
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 1782 of file nodePath.I.
References is_empty(), and LVecBase3f::zero().
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 1372 of file nodePath.I.
References is_empty(), and LVecBase2f::zero().
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 1638 of file nodePath.I.
References is_empty(), and LVecBase2f::zero().
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 1502 of file nodePath.I.
References is_empty(), and LVecBase3f::zero().
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 1768 of file nodePath.I.
References is_empty(), and LVecBase3f::zero().
| float NodePath::get_tex_rotate |
( |
TextureStage * |
stage | ) |
const [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 1387 of file nodePath.I.
References is_empty().
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 1653 of file nodePath.I.
References is_empty().
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 1402 of file nodePath.I.
References is_empty().
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 1668 of file nodePath.I.
References is_empty().
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 1530 of file nodePath.I.
References is_empty().
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 1796 of file nodePath.I.
References is_empty().
| Texture * NodePath::get_texture |
( |
| ) |
const |
| 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 470 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(), get_top_node(), GraphicsEngine::render_frame(), NonlinearImager::set_viewer_camera(), and PhysxActor::update_transform().
| PandaNode * NodePath::get_top_node |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const [inline] |
Returns the top node of the path, or NULL if the path is empty.
This requires iterating through the path.
Definition at line 230 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 1078 of file nodePath.cxx.
References PandaNode::get_transform(), is_empty(), and node().
Referenced by DXGraphicsStateGuardian9::bind_clip_plane(), DXGraphicsStateGuardian8::bind_clip_plane(), TinyGraphicsStateGuardian::bind_light(), DXGraphicsStateGuardian9::bind_light(), DXGraphicsStateGuardian8::bind_light(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), GraphicsEngine::do_cull(), CollisionEntry::get_all(), CollisionEntry::get_all_contact_info(), CollisionEntry::get_contact_normal(), CollisionEntry::get_contact_pos(), get_hpr(), CollisionEntry::get_interior_point(), get_mat(), get_pos(), get_pos_delta(), get_quat(), get_relative_point(), get_relative_vector(), get_scale(), get_shear(), CollisionEntry::get_surface_normal(), CollisionEntry::get_surface_point(), NurbsSurfaceEvaluator::get_vertices(), CollisionHandlerPusher::handle_entries(), CollisionHandlerGravity::handle_entries(), CollisionHandlerFluidPusher::handle_entries(), CollisionHandlerFloor::handle_entries(), heads_up(), look_at(), PGItem::mouse_to_local(), BaseIntegrator::precompute_angular_matrices(), BaseIntegrator::precompute_linear_matrices(), CollisionLevelStateBase::prepare_collider(), PortalClipper::prepare_portal(), CLerpNodePathInterval::priv_step(), CConstrainTransformInterval::priv_step(), ProjectionScreen::recompute_if_stale(), MultitexReducer::scan(), set_fluid_pos(), set_hpr(), set_hpr_scale(), set_pos(), set_pos_hpr(), set_pos_quat(), set_quat(), set_quat_scale(), set_scale(), PipeOcclusionCullTraverser::set_scene(), set_shear(), set_transform(), CullTraverser::traverse(), wrt_reparent_to(), and PGItem::xform().
| TransparencyAttrib::Mode NodePath::get_transparency |
( |
| ) |
const |
| bool NodePath::get_two_sided |
( |
| ) |
const |
| bool NodePath::has_antialias |
( |
| ) |
const |
| bool NodePath::has_attrib |
( |
TypeHandle |
type | ) |
const [inline] |
| 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 5913 of file nodePath.cxx.
References PandaNode::has_attrib(), is_empty(), and node().
| bool NodePath::has_billboard |
( |
| ) |
const |
| bool NodePath::has_bin |
( |
| ) |
const |
| bool NodePath::has_clip_plane |
( |
const NodePath & |
clip_plane | ) |
const |
| bool NodePath::has_clip_plane_off |
( |
| ) |
const |
| bool NodePath::has_clip_plane_off |
( |
const NodePath & |
clip_plane | ) |
const |
| bool NodePath::has_color |
( |
| ) |
const |
| 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 2518 of file nodePath.cxx.
References PandaNode::has_attrib(), is_empty(), and node().
| bool NodePath::has_compass |
( |
| ) |
const |
| bool NodePath::has_depth_offset |
( |
| ) |
const |
| bool NodePath::has_depth_test |
( |
| ) |
const |
| bool NodePath::has_depth_write |
( |
| ) |
const |
| bool NodePath::has_effect |
( |
TypeHandle |
type | ) |
const [inline] |
| bool NodePath::has_fog |
( |
| ) |
const |
| bool NodePath::has_fog_off |
( |
| ) |
const |
| bool NodePath::has_light |
( |
const NodePath & |
light | ) |
const |
| bool NodePath::has_light_off |
( |
| ) |
const |
| bool NodePath::has_light_off |
( |
const NodePath & |
light | ) |
const |
| bool NodePath::has_mat |
( |
| ) |
const [inline] |
| bool NodePath::has_material |
( |
| ) |
const |
| bool NodePath::has_net_tag |
( |
const string & |
key | ) |
const [inline] |
| bool NodePath::has_parent |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const [inline] |
Returns true if the referenced node has a parent; i.e.
the NodePath chain contains at least two nodes.
Definition at line 387 of file nodePath.I.
References is_empty(), and is_singleton().
Referenced by PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), PandaFramework::event_arrow_up(), get_parent(), get_sort(), premunge_scene(), reverse_ls(), PandaFramework::set_highlight(), set_tex_transform(), and set_transform().
| bool NodePath::has_render_mode |
( |
| ) |
const |
| 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 3289 of file nodePath.cxx.
References has_effect().
| bool NodePath::has_tag |
( |
const string & |
key | ) |
const [inline] |
| bool NodePath::has_tex_projector |
( |
TextureStage * |
stage | ) |
const |
| bool NodePath::has_tex_transform |
( |
TextureStage * |
stage | ) |
const |
| bool NodePath::has_texcoord |
( |
const string & |
texcoord_name | ) |
const [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 1822 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 3541 of file nodePath.cxx.
References get_texture().
| bool NodePath::has_texture_off |
( |
| ) |
const |
| bool NodePath::has_texture_off |
( |
TextureStage * |
stage | ) |
const |
| bool NodePath::has_transparency |
( |
| ) |
const |
| bool NodePath::has_two_sided |
( |
| ) |
const |
| 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 4556 of file nodePath.cxx.
References is_empty(), and node().
Referenced by has_texcoord().
| void NodePath::heads_up |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
| void NodePath::heads_up |
( |
const LPoint3f & |
point, |
|
|
const LVector3f & |
up = LVector3f::up() |
|
) |
| |
| void NodePath::heads_up |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
Behaves like look_at(), but with a strong preference to keeping the up vector oriented in the indicated "up" direction.
Definition at line 1140 of file nodePath.I.
References heads_up().
| void NodePath::hide |
( |
| ) |
[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.
Definition at line 1958 of file nodePath.I.
References PandaNode::adjust_draw_mask(), BitMask< PN_uint32, 32 >::all_off(), PandaNode::get_overall_bit(), is_empty(), and node().
Referenced by NodePathCollection::hide(), PandaFramework::hide_collision_solids(), HideInterval::priv_instant(), and ShowInterval::priv_reverse_instant().
| void NodePath::hide |
( |
DrawMask |
camera_mask | ) |
[inline] |
| void NodePath::hide_bounds |
( |
| ) |
|
| 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 771 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(), instance_under_node(), and PandaFramework::set_highlight().
| NodePath NodePath::instance_under_node |
( |
const NodePath & |
other, |
|
|
const string & |
name, |
|
|
int |
sort = 0, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const |
| bool NodePath::is_ancestor_of |
( |
const NodePath & |
other, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const [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 307 of file nodePath.I.
| bool NodePath::is_empty |
( |
| ) |
const [inline] |
Returns true if the NodePath contains no nodes.
Definition at line 196 of file nodePath.I.
Referenced by CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), SpriteParticleRenderer::add_from_node(), MouseWatcher::add_group(), AttribNodeRegistry::add_node(), NonlinearImager::add_screen(), NonlinearImager::add_viewer(), adjust_all_priorities(), WindowFramework::adjust_aspect_ratio(), CompassEffect::adjust_transform(), BillboardEffect::adjust_transform(), ShaderGenerator::analyze_renderstate(), PhysicsCollisionHandler::apply_net_shove(), 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_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_mat(), clear_material(), clear_model_nodes(), clear_render_mode(), clear_tag(), clear_tex_gen(), clear_tex_projector(), clear_tex_transform(), PandaFramework::clear_text(), clear_texture(), clear_transparency(), clear_two_sided(), compose_color_scale(), PGItem::compute_internal_bounds(), copy_to(), count_num_descendants(), PortalNode::cull_callback(), BillboardEffect::cull_callback(), detach_node(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), GraphicsStateGuardian::do_issue_clip_plane(), TinyGraphicsStateGuardian::do_issue_light(), GraphicsStateGuardian::do_issue_light(), PandaFramework::event_A(), PandaFramework::event_B(), PandaFramework::event_C(), PandaFramework::event_c(), PandaFramework::event_L(), GraphicsStateGuardian::fetch_specified_part(), find(), find_all_matches(), find_all_materials(), find_all_paths_to(), find_all_texcoords(), find_all_texture_stages(), find_all_textures(), find_all_vertex_columns(), find_material(), find_net_tag(), AttribNodeRegistry::find_node(), find_path_to(), find_texture(), find_texture_stage(), flatten_light(), flatten_medium(), flatten_strong(), force_recompute_bounds(), get_antialias(), WindowFramework::get_aspect_2d(), get_attrib(), get_bin_draw_order(), get_bin_name(), WindowFramework::get_camera_group(), get_children(), 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_instance_count(), get_key(), get_mat(), PandaFramework::get_models(), LightAttrib::get_most_important_light(), WindowFramework::get_mouse(), get_name(), get_num_children(), get_num_nodes(), get_pos(), get_pos_delta(), get_prev_transform(), get_quat(), PGItem::get_relative_frame(), WindowFramework::get_render(), WindowFramework::get_render_2d(), get_render_mode(), get_render_mode_perspective(), get_render_mode_thickness(), get_scale(), get_shear(), get_stashed_children(), get_state(), get_tag(), get_tex_gen(), get_tex_gen_light(), get_tex_hpr(), get_tex_offset(), get_tex_pos(), get_tex_projector_from(), get_tex_projector_to(), get_tex_rotate(), get_tex_scale(), get_tex_scale_3d(), get_texture(), get_top(), get_top_node(), get_transform(), get_transparency(), get_two_sided(), NurbsSurfaceEvaluator::get_vertex(), NurbsSurfaceEvaluator::get_vertices(), BillboardEffect::has_adjust_transform(), has_antialias(), has_attrib(), has_audio_volume(), has_billboard(), has_bin(), CollisionHandlerPhysical::has_center(), has_clip_plane(), 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_mat(), has_material(), has_net_tag(), has_parent(), has_render_mode(), has_tag(), has_tex_gen(), has_tex_projector(), has_tex_transform(), has_texture(), has_texture_off(), has_transparency(), has_two_sided(), has_vertex_column(), heads_up(), hide(), hide_bounds(), CDistributedSmoothNodeBase::initialize(), instance_to(), PGItem::instance_to_state_def(), instance_under_node(), is_hidden(), is_stashed(), list_tags(), WindowFramework::load_models(), look_at(), AttribNodeRegistry::lookup_node(), ls(), node(), NodePath(), operator bool(), premunge_scene(), prepare_scene(), CLerpNodePathInterval::priv_step(), CConstrainTransformInterval::priv_step(), CConstrainPosInterval::priv_step(), CConstrainPosHprInterval::priv_step(), CConstrainHprInterval::priv_step(), project_texture(), PGItem::r_prepare_scene(), ProjectionScreen::recompute_if_stale(), MouseWatcher::remove_group(), remove_node(), AttribNodeRegistry::remove_node(), GraphicsEngine::render_frame(), EggLoader::reparent_decals(), reparent_to(), MouseWatcher::replace_group(), reverse_ls(), set_all_color_scale(), set_alpha_scale(), set_antialias(), set_attrib(), set_audio_volume(), set_audio_volume_off(), set_billboard_axis(), set_billboard_point_eye(), set_billboard_point_world(), set_bin(), DisplayRegion::set_camera(), set_clip_plane(), 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_fog(), set_fog_off(), PGItem::set_frame_style(), SpriteParticleRenderer::set_from_node(), PandaFramework::set_highlight(), set_hpr(), set_hpr_scale(), set_instance_count(), set_light(), set_light_off(), set_mat(), set_material(), set_material_off(), set_name(), set_pos(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_prev_transform(), ProjectionScreen::set_projector(), set_quat(), set_quat_scale(), set_render_mode(), set_render_mode_filled(), set_render_mode_perspective(), set_render_mode_thickness(), set_render_mode_wireframe(), set_scale(), set_shear(), NonlinearImager::set_source_camera(), set_state(), set_tag(), set_tex_gen(), set_tex_hpr(), set_tex_offset(), set_tex_pos(), set_tex_projector(), set_tex_rotate(), set_tex_scale(), set_tex_transform(), set_texture(), set_texture_off(), set_transform(), set_transparency(), set_two_sided(), NonlinearImager::set_viewer_camera(), show(), show_bounds(), show_through(), show_tight_bounds(), stash(), stash_to(), unify_texture_stages(), unstash(), PhysxActor::update_transform(), CollisionHandlerPhysical::validate_target(), verify_complete(), WorkingNodePath::WorkingNodePath(), write_bam_file(), write_bam_stream(), and wrt_reparent_to().
| bool NodePath::is_hidden |
( |
DrawMask |
camera_mask = PandaNode::get_overall_bit() | ) |
const [inline] |
| bool NodePath::is_same_graph |
( |
const NodePath & |
other, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| const [inline] |
| bool NodePath::is_singleton |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
const [inline] |
| bool NodePath::is_stashed |
( |
| ) |
const [inline] |
| void NodePath::list_tags |
( |
| ) |
const [inline] |
| void NodePath::look_at |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
| void NodePath::look_at |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
| void NodePath::look_at |
( |
const LPoint3f & |
point, |
|
|
const LVector3f & |
up = LVector3f::up() |
|
) |
| |
| void NodePath::ls |
( |
| ) |
const [inline] |
| void NodePath::ls |
( |
ostream & |
out, |
|
|
int |
indent_level = 0 |
|
) |
| const [inline] |
| PandaNode * NodePath::node |
( |
| ) |
const [inline] |
Returns the referenced node of the path.
Definition at line 244 of file nodePath.I.
References is_empty().
Referenced by PGItem::activate_region(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), NonlinearImager::add_screen(), adjust_all_priorities(), ShaderGenerator::analyze_renderstate(), CollisionBox::apply_clip_plane(), PhysicsCollisionHandler::apply_net_shove(), apply_texture_colors(), DXGraphicsStateGuardian9::bind_clip_plane(), DXGraphicsStateGuardian8::bind_clip_plane(), calc_tight_bounds(), clear_antialias(), clear_attrib(), clear_audio_volume(), clear_billboard(), clear_bin(), 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_mat(), clear_material(), clear_model_nodes(), MouseWatcherGroup::clear_regions(), clear_render_mode(), clear_tag(), clear_tex_gen(), clear_tex_projector(), clear_tex_transform(), clear_texture(), clear_transparency(), clear_two_sided(), compose_color_scale(), PGItem::compute_internal_bounds(), copy_to(), PGItem::cull_callback(), PGEntry::cull_callback(), decode_from_bam_stream(), detach_node(), GraphicsStateGuardian::do_issue_clip_plane(), TinyGraphicsStateGuardian::do_issue_light(), GraphicsStateGuardian::do_issue_light(), MouseWatcherGroup::do_remove_region(), ModelFlattenRequest::do_task(), MouseWatcherGroup::do_update_regions(), encode_to_bam_stream(), PandaFramework::event_A(), PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), GraphicsStateGuardian::fetch_specified_part(), find_all_materials(), find_all_texcoords(), find_all_texture_stages(), find_all_textures(), find_all_vertex_columns(), find_material(), find_texture(), find_texture_stage(), flatten_light(), flatten_medium(), flatten_strong(), force_recompute_bounds(), GeoMipTerrain::generate(), MeshDrawer::geometry(), get_antialias(), WindowFramework::get_aspect_2d(), get_attrib(), get_audio_volume(), get_bin_draw_order(), get_bin_name(), get_children(), 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(), LightAttrib::get_light(), get_mat(), LightAttrib::get_most_important_light(), get_name(), get_prev_transform(), WindowFramework::get_render(), get_render_mode(), get_render_mode_perspective(), get_render_mode_thickness(), get_sort(), get_stashed_ancestor(), get_stashed_children(), get_state(), get_tag(), get_tex_gen(), get_tex_gen_light(), get_tex_projector_from(), get_tex_projector_to(), get_texture(), 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_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_mat(), has_material(), has_render_mode(), has_tag(), has_tex_gen(), has_tex_projector(), has_tex_transform(), has_texture(), has_texture_off(), has_transparency(), has_two_sided(), has_vertex_column(), 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(), PGItem::r_prepare_scene(), ProjectionScreen::recompute_if_stale(), remove_node(), GraphicsEngine::render_frame(), EggLoader::reparent_decals(), reparent_to(), reverse_ls(), MultitexReducer::scan(), set_all_color_scale(), set_alpha_scale(), set_antialias(), set_attrib(), set_audio_volume(), set_audio_volume_off(), set_billboard_axis(), set_billboard_point_eye(), set_billboard_point_world(), set_bin(), DisplayRegion::set_camera(), set_clip_plane(), 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(), PhysxTriangleMeshDesc::set_from_node_path(), PhysxConvexMeshDesc::set_from_node_path(), PhysxClothMeshDesc::set_from_node_path(), set_instance_count(), set_light(), set_light_off(), set_mat(), set_material(), set_material_off(), set_name(), WindowFramework::set_one_sided_reverse(), set_pos(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_prev_transform(), ProjectionScreen::set_projector(), set_render_mode(), set_render_mode_filled(), set_render_mode_perspective(), set_render_mode_thickness(), set_render_mode_wireframe(), NonlinearImager::set_source_camera(), set_state(), set_tag(), set_tex_gen(), set_tex_projector(), set_tex_transform(), set_texture(), set_texture_off(), set_transform(), set_transparency(), set_two_sided(), NonlinearImager::set_viewer_camera(), WindowFramework::set_wireframe(), WindowFramework::setup_trackball(), SceneGraphAnalyzerMeter::setup_window(), FrameRateMeter::setup_window(), show(), show_bounds(), PandaFramework::show_collision_solids(), show_through(), show_tight_bounds(), stash_to(), unify_texture_stages(), GeoMipTerrain::update(), PhysicsCollisionHandler::validate_target(), verify_complete(), WorkingNodePath::WorkingNodePath(), write_bam_file(), write_bam_stream(), LightAttrib::write_datagram(), ClipPlaneAttrib::write_datagram(), wrt_reparent_to(), and PGItem::xform().
| NodePath NodePath::not_found |
( |
| ) |
[inline, static] |
| NodePath::operator bool |
( |
| ) |
const |
| bool NodePath::operator!= |
( |
const NodePath & |
other | ) |
const [inline] |
Returns true if the two paths are not equivalent.
Definition at line 2066 of file nodePath.I.
| bool NodePath::operator< |
( |
const NodePath & |
other | ) |
const [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 2080 of file nodePath.I.
| bool NodePath::operator== |
( |
const NodePath & |
other | ) |
const [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 2056 of file nodePath.I.
| void NodePath::output |
( |
ostream & |
out | ) |
const |
Writes a sensible description of the NodePath to the indicated output stream.
Definition at line 973 of file nodePath.cxx.
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 6217 of file nodePath.cxx.
References get_parent(), has_parent(), is_empty(), node(), and SceneGraphReducer::premunge().
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 within the scene are loaded in texture memory, and display lists are built up from static geometry.
Definition at line 6245 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::prepare_scene().
| 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 910 of file nodePath.cxx.
References get_key(), Thread::get_pipeline_stage(), is_empty(), is_singleton(), node(), removed(), and PandaNode::reset_prev_transform().
Referenced by PGEntry::clear_cursor_def(), PandaFramework::clear_text(), WindowFramework::close_window(), MouseWatcherGroup::do_hide_regions(), MayaPview::doIt(), instance_under_node(), MeshDrawer::~MeshDrawer(), MeshDrawer2D::~MeshDrawer2D(), and ParticleSystem::~ParticleSystem().
| NodePath NodePath::removed |
( |
| ) |
[inline, static] |
| 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 676 of file nodePath.cxx.
References Thread::get_pipeline_stage(), is_empty(), node(), PandaNode::reset_prev_transform(), and verify_complete().
Referenced by ParticleSystem::ParticleSystem(), EggLoader::reparent_decals(), NodePathCollection::reparent_to(), PandaFramework::set_highlight(), and wrt_reparent_to().
| int NodePath::reverse_ls |
( |
ostream & |
out, |
|
|
int |
indent_level = 0 |
|
) |
| const [inline] |
| void NodePath::reverse_ls |
( |
| ) |
const [inline] |
| void NodePath::set_all_color_scale |
( |
float |
scale, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_alpha_scale |
( |
float |
scale, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_antialias |
( |
unsigned short |
mode, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_attrib |
( |
const RenderAttrib * |
attrib, |
|
|
int |
priority = 0 |
|
) |
| [inline] |
| void NodePath::set_audio_volume |
( |
float |
volume, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_audio_volume_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_billboard_axis |
( |
float |
offset = 0.0 | ) |
[inline] |
Puts a billboard transition on the node such that it will rotate in two dimensions around the up axis.
Definition at line 1833 of file nodePath.I.
References NodePath().
| void NodePath::set_billboard_axis |
( |
const NodePath & |
camera, |
|
|
float |
offset |
|
) |
| |
| void NodePath::set_billboard_point_eye |
( |
const NodePath & |
camera, |
|
|
float |
offset |
|
) |
| |
| void NodePath::set_billboard_point_eye |
( |
float |
offset = 0.0 | ) |
[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 1846 of file nodePath.I.
References NodePath().
| void NodePath::set_billboard_point_world |
( |
const NodePath & |
camera, |
|
|
float |
offset |
|
) |
| |
| void NodePath::set_billboard_point_world |
( |
float |
offset = 0.0 | ) |
[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 1858 of file nodePath.I.
References NodePath().
| void NodePath::set_bin |
( |
const 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 3318 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
Referenced by MouseWatcherGroup::do_show_regions(), and MultitexReducer::flatten().
| void NodePath::set_clip_plane |
( |
const NodePath & |
clip_plane, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_clip_plane_off |
( |
const NodePath & |
clip_plane, |
|
|
int |
priority = 0 |
|
) |
| |
| 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 3028 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
| void NodePath::set_collide_mask |
( |
CollideMask |
new_mask, |
|
|
CollideMask |
bits_to_change = CollideMask::all_on(), |
|
|
TypeHandle |
node_type = TypeHandle::none() |
|
) |
| [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 2037 of file nodePath.I.
References is_empty(), node(), and TypeHandle::none().
Referenced by NodePathCollection::set_collide_mask().
| void NodePath::set_color |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a = 1.0, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_color |
( |
const Colorf & |
color, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_color_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_color_scale |
( |
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz, |
|
|
float |
sa, |
|
|
int |
priority = 0 |
|
) |
| [inline] |
| void NodePath::set_color_scale |
( |
const LVecBase4f & |
scale, |
|
|
int |
priority = 0 |
|
) |
| |
Sets the color scale component of the transform, leaving translation and rotation untouched.
Definition at line 2578 of file nodePath.cxx.
References PandaNode::get_attrib(), get_state(), is_empty(), node(), and PandaNode::set_attrib().
Referenced by NodePathCollection::set_color_scale(), set_color_scale(), set_sa(), set_sb(), set_sg(), and set_sr().
| void NodePath::set_color_scale_off |
( |
int |
priority = 0 | ) |
|
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 5745 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 5514 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
| void NodePath::set_depth_test |
( |
bool |
depth_test, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_depth_write |
( |
bool |
depth_write, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_effect |
( |
const RenderEffect * |
effect | ) |
[inline] |
| void NodePath::set_effects |
( |
const RenderEffects * |
effects | ) |
[inline] |
| void NodePath::set_fluid_pos |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [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 957 of file nodePath.I.
References set_fluid_pos().
| void NodePath::set_fluid_pos |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [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 736 of file nodePath.I.
Referenced by set_fluid_pos().
| void NodePath::set_fluid_pos |
( |
const LVecBase3f & |
pos | ) |
|
| void NodePath::set_fog |
( |
Fog * |
fog, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_fog_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_hpr |
( |
const NodePath & |
other, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [inline] |
Sets the rotation component of the transform, relative to the other node.
Definition at line 983 of file nodePath.I.
References set_hpr().
| void NodePath::set_hpr |
( |
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [inline] |
| void NodePath::set_hpr_scale |
( |
const NodePath & |
other, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz |
|
) |
| [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 1099 of file nodePath.I.
References set_hpr_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 2210 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
| void NodePath::set_hpr_scale |
( |
float |
h, |
|
|
float |
p, |
|
|
float |
r, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz |
|
) |
| [inline] |
| void NodePath::set_instance_count |
( |
int |
instance_count | ) |
|
| void NodePath::set_light |
( |
const NodePath & |
light, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_light_off |
( |
const NodePath & |
light, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_light_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_mat |
( |
const LMatrix4f & |
mat | ) |
|
| 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 4915 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
| void NodePath::set_material_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_max_search_depth |
( |
int |
max_search_depth | ) |
[inline, static] |
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 175 of file nodePath.I.
| void NodePath::set_name |
( |
const string & |
name | ) |
[inline] |
| void NodePath::set_normal_map |
( |
Texture * |
normal_map, |
|
|
const string & |
texcoord_name = string(), |
|
|
bool |
preserve_color = false |
|
) |
| |
A convenience function to set up a normal map on this geometry.
This uses the single highest-priority light on the object only. It also requires multitexture, and consumes at least two texture stages, in addition to what may already be in use.
The normal_map parameter is the texture that contains the normal map information (with a 3-d delta vector encoded into the r,g,b of each texel). texcoord_name is the name of the texture coordinate set that contains the tangent and binormal we wish to use. If preserve_color is true, then one additional texture stage is consumed to blend in the geometry's original vertex color.
Only one normal map may be in effect through this interface at any given time.
Definition at line 4474 of file nodePath.cxx.
References clear_normal_map(), TexturePool::get_normalization_cube_map(), NodePath(), set_tex_gen(), and set_texture().
| void NodePath::set_pos |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
Sets the translation component of the transform, relative to the other node.
Definition at line 944 of file nodePath.I.
References set_pos().
| void NodePath::set_pos |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
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.
Definition at line 723 of file nodePath.I.
Referenced by SmoothMover::apply_smooth_pos(), SmoothMover::apply_smooth_pos_hpr(), do_billboard_axis(), do_billboard_point_eye(), do_billboard_point_world(), PathFollow::do_follow(), CollisionHandlerFluidPusher::handle_entries(), CLerpNodePathInterval::priv_step(), CConstrainPosInterval::priv_step(), set_fluid_pos(), GeoMipTerrain::set_focal_point(), set_pos(), set_tex_pos(), PathFollow::start(), and AICharacter::update().
| void NodePath::set_pos_hpr |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [inline] |
Sets the translation and rotation component of the transform, relative to the other node.
Definition at line 1084 of file nodePath.I.
References set_pos_hpr().
| void NodePath::set_pos_hpr |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [inline] |
| void NodePath::set_pos_hpr_scale |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz |
|
) |
| [inline] |
| void NodePath::set_pos_hpr_scale |
( |
const NodePath & |
other, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz |
|
) |
| [inline] |
Completely replaces the transform with new translation, rotation, and scale components, relative to the other node.
Definition at line 1112 of file nodePath.I.
References set_pos_hpr_scale().
| void NodePath::set_prev_transform |
( |
const TransformState * |
transform, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline] |
| void NodePath::set_prev_transform |
( |
const NodePath & |
other, |
|
|
const TransformState * |
transform, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
Sets the "previous" transform object on this node, relative to the other node.
This computes a new transform object that will have the indicated value when seen from the other node.
Definition at line 1228 of file nodePath.cxx.
Sets the rotation component of the transform, leaving translation and scale untouched.
Definition at line 1421 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(), look_at(), CLerpNodePathInterval::priv_step(), CConstrainHprInterval::priv_step(), and set_quat().
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 2231 of file nodePath.cxx.
References get_transform(), is_empty(), and set_transform().
| void NodePath::set_render_mode |
( |
RenderModeAttrib::Mode |
mode, |
|
|
float |
thickness, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_render_mode_filled |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_render_mode_perspective |
( |
bool |
perspective, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_render_mode_thickness |
( |
float |
thickness, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_render_mode_wireframe |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_sa |
( |
float |
sa | ) |
[inline] |
| void NodePath::set_sb |
( |
float |
sb | ) |
[inline] |
| void NodePath::set_scale |
( |
const NodePath & |
other, |
|
|
float |
sx, |
|
|
float |
sy, |
|
|
float |
sz |
|
) |
| [inline] |
Sets the scale component of the transform, relative to the other node.
Definition at line 1020 of file nodePath.I.
References set_scale().
| void NodePath::set_scale |
( |
const NodePath & |
other, |
|
|
float |
scale |
|
) |
| [inline] |
Sets the scale component of the transform, relative to the other node.
Definition at line 1009 of file nodePath.I.
References set_scale().
| void NodePath::set_scale |
( |
float |
scale | ) |
[inline] |
| void NodePath::set_scale |
( |
const LVecBase3f & |
scale | ) |
|
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 3261 of file nodePath.cxx.
References set_effect().
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 3213 of file nodePath.cxx.
References set_effect().
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 3245 of file nodePath.cxx.
References set_effect().
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 3229 of file nodePath.cxx.
References set_effect().
| void NodePath::set_scissor |
( |
float |
left, |
|
|
float |
right, |
|
|
float |
bottom, |
|
|
float |
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 3198 of file nodePath.cxx.
References set_effect().
| void NodePath::set_sg |
( |
float |
sg | ) |
[inline] |
| void NodePath::set_shear |
( |
float |
shxy, |
|
|
float |
shxz, |
|
|
float |
shyz |
|
) |
| [inline] |
| void NodePath::set_shear |
( |
const NodePath & |
other, |
|
|
float |
shxy, |
|
|
float |
shxz, |
|
|
float |
shyz |
|
) |
| [inline] |
Sets the shear component of the transform, relative to the other node.
Definition at line 1052 of file nodePath.I.
References set_shear().
| void NodePath::set_shear |
( |
const LVecBase3f & |
shear | ) |
|
| void NodePath::set_sr |
( |
float |
sr | ) |
[inline] |
| void NodePath::set_state |
( |
const RenderState * |
state, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline] |
| void NodePath::set_state |
( |
const NodePath & |
other, |
|
|
const RenderState * |
state, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
Sets the state object on this node, relative to the other node.
This computes a new state object that will have the indicated value when seen from the other node.
Definition at line 1055 of file nodePath.cxx.
| void NodePath::set_tag |
( |
const string & |
key, |
|
|
const string & |
value |
|
) |
| [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 2141 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_tag().
| void NodePath::set_tex_gen |
( |
TextureStage * |
stage, |
|
|
RenderAttrib::TexGenMode |
mode, |
|
|
const string & |
source_name, |
|
|
const NodePath & |
light, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_tex_gen |
( |
TextureStage * |
stage, |
|
|
RenderAttrib::TexGenMode |
mode, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_tex_gen |
( |
TextureStage * |
stage, |
|
|
RenderAttrib::TexGenMode |
mode, |
|
|
const TexCoord3f & |
constant_value, |
|
|
int |
priority = 0 |
|
) |
| |
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 1459 of file nodePath.I.
References is_empty(), set_hpr(), and set_tex_transform().
| void NodePath::set_tex_hpr |
( |
const NodePath & |
other, |
|
|
TextureStage * |
stage, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [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 1711 of file nodePath.I.
References set_tex_hpr().
| void NodePath::set_tex_hpr |
( |
TextureStage * |
stage, |
|
|
float |
h, |
|
|
float |
p, |
|
|
float |
r |
|
) |
| [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 1445 of file nodePath.I.
Referenced by set_tex_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.
This call is appropriate for 3-d texture coordinates.
Definition at line 1725 of file nodePath.I.
References is_empty(), set_hpr(), and set_tex_transform().
| void NodePath::set_tex_offset |
( |
TextureStage * |
stage, |
|
|
float |
u, |
|
|
float |
v |
|
) |
| [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 1279 of file nodePath.I.
Referenced by set_tex_offset().
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 1293 of file nodePath.I.
References is_empty(), and set_tex_transform().
| void NodePath::set_tex_offset |
( |
const NodePath & |
other, |
|
|
TextureStage * |
stage, |
|
|
float |
u, |
|
|
float |
v |
|
) |
| [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 1545 of file nodePath.I.
References set_tex_offset().
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 1559 of file nodePath.I.
References is_empty(), and set_tex_transform().
| void NodePath::set_tex_pos |
( |
const NodePath & |
other, |
|
|
TextureStage * |
stage, |
|
|
float |
u, |
|
|
float |
v, |
|
|
float |
w |
|
) |
| [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 1682 of file nodePath.I.
References set_tex_pos().
| void NodePath::set_tex_pos |
( |
TextureStage * |
stage, |
|
|
float |
u, |
|
|
float |
v, |
|
|
float |
w |
|
) |
| [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 1416 of file nodePath.I.
Referenced by set_tex_pos().
| void NodePath::set_tex_rotate |
( |
TextureStage * |
stage, |
|
|
float |
r |
|
) |
| [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 1310 of file nodePath.I.
References is_empty(), and set_tex_transform().
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 1576 of file nodePath.I.
References is_empty(), and set_tex_transform().
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 1356 of file nodePath.I.
References is_empty(), and set_tex_transform().
| void NodePath::set_tex_scale |
( |
const NodePath & |
other, |
|
|
TextureStage * |
stage, |
|
|
float |
su, |
|
|
float |
sv |
|
) |
| [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 1608 of file nodePath.I.
References set_tex_scale().
| void NodePath::set_tex_scale |
( |
TextureStage * |
stage, |
|
|
float |
su, |
|
|
float |
sv, |
|
|
float |
sw |
|
) |
| [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 1474 of file nodePath.I.
References set_tex_scale().
| void NodePath::set_tex_scale |
( |
TextureStage * |
stage, |
|
|
float |
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 1622 of file nodePath.I.
References is_empty(), and set_tex_transform().
| void NodePath::set_tex_scale |
( |
TextureStage * |
stage, |
|
|
float |
su, |
|
|
float |
sv |
|
) |
| [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 1342 of file nodePath.I.
References set_tex_scale().
| void NodePath::set_tex_scale |
( |
const NodePath & |
other, |
|
|
TextureStage * |
stage, |
|
|
float |
su, |
|
|
float |
sv, |
|
|
float |
sw |
|
) |
| [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 1740 of file nodePath.I.
References set_tex_scale().
| void NodePath::set_texture |
( |
Texture * |
tex, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_texture_off |
( |
int |
priority = 0 | ) |
|
| void NodePath::set_texture_off |
( |
TextureStage * |
stage, |
|
|
int |
priority = 0 |
|
) |
| |
| void NodePath::set_transform |
( |
const TransformState * |
transform, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| [inline] |
Changes the complete transform object on this node.
Definition at line 658 of file nodePath.I.
References is_empty(), node(), and PandaNode::set_transform().
Referenced by clear_transform(), CollisionHandlerPusher::handle_entries(), CollisionHandlerGravity::handle_entries(), CollisionHandlerFloor::handle_entries(), CConstrainTransformInterval::priv_step(), set_fluid_pos(), set_hpr(), set_hpr_scale(), set_mat(), set_pos(), set_pos_hpr(), set_pos_hpr_scale(), set_pos_hpr_scale_shear(), set_pos_quat(), set_pos_quat_scale(), set_pos_quat_scale_shear(), set_quat(), set_quat_scale(), set_scale(), set_shear(), set_transform(), PhysxActor::update_transform(), wrt_reparent_to(), and PGItem::xform().
| void NodePath::set_transform |
( |
const NodePath & |
other, |
|
|
const TransformState * |
transform, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
| 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 5782 of file nodePath.cxx.
References is_empty(), node(), and PandaNode::set_attrib().
| 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 5291 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::show |
( |
| ) |
[inline] |
| void NodePath::show |
( |
DrawMask |
camera_mask | ) |
[inline] |
| void NodePath::show_bounds |
( |
| ) |
|
| void NodePath::show_through |
( |
| ) |
[inline] |
| void NodePath::show_through |
( |
DrawMask |
camera_mask | ) |
[inline] |
| 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 6278 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 6063 of file nodePath.cxx.
References Thread::get_pipeline_stage(), is_empty(), is_singleton(), and verify_complete().
Referenced by NodePathCollection::stash().
| void NodePath::stash_to |
( |
const NodePath & |
other, |
|
|
int |
sort = 0, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
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 4812 of file nodePath.cxx.
References is_empty(), and node().
| void NodePath::unstash |
( |
int |
sort = 0, |
|
|
Thread * |
current_thread = Thread::get_current_thread() |
|
) |
| |
| void NodePath::unstash_all |
( |
Thread * |
current_thread = Thread::get_current_thread() | ) |
|
| 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 6146 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(), copy_to(), 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 |
| bool NodePath::write_bam_stream |
( |
ostream & |
out | ) |
const |
| void NodePath::write_bounds |
( |
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 6339 of file nodePath.cxx.
| 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 725 of file nodePath.cxx.
References get_prev_transform(), get_transform(), is_empty(), node(), reparent_to(), PandaNode::reset_prev_transform(), set_prev_transform(), set_transform(), and verify_complete().
Referenced by NodePathCollection::wrt_reparent_to().
The documentation for this class was generated from the following files:
| | |