Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

NodePath Class Reference

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)
 This constructs a new NodePath with a single node.

 NodePath (PandaNode *node)
 This constructs a NodePath for the indicated node.

 NodePath (const NodePath &parent, PandaNode *child_node)
 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 &copy)
void operator= (const NodePath &copy)
bool is_empty () const
 Returns true if the NodePath contains no nodes.

bool is_singleton () const
 Returns true if the NodePath contains exactly one node.

int get_num_nodes () const
 Returns the number of nodes in the path.

PandaNodeget_node (int index) const
 Returns the nth node of the path, where 0 is the referenced (bottom) node and get_num_nodes() - 1 is the top node.

ErrorType get_error_type () const
 If is_empty() is true, this returns a code that represents the reason why the NodePath is empty.

PandaNodeget_top_node () const
 Returns the top node of the path, or NULL if the path is empty.

PandaNodenode () const
 Returns the referenced node of the path.

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.

NodePathCollection get_children () const
 Returns the set of all child nodes of the referenced node.

int get_num_children () const
 Returns the number of children of the referenced node.

NodePath get_child (int n) const
 Returns a NodePath representing the nth child of the referenced node.

bool has_parent () const
 Returns true if the referenced node has a parent; i.e.

NodePath get_parent () const
 Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node.

NodePath find (const string &path) const
 Searches for a node below the referenced node that matches the indicated string.

NodePath find_path_to (PandaNode *node) const
 Searches for the indicated node below this node and returns the shortest NodePath that connects them.

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.

NodePathCollection find_all_paths_to (PandaNode *node) const
 Returns the set of all NodePaths that extend from this NodePath down to the indicated node.

void reparent_to (const NodePath &other, int sort=0)
 Removes the referenced node of the NodePath from its current parent and attaches it to the referenced node of the indicated NodePath.

void wrt_reparent_to (const NodePath &other, int sort=0)
 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.

NodePath instance_to (const NodePath &other, int sort=0) 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) const
 Behaves like instance_to(), but implicitly creates a new node to instance the geometry under, and returns a NodePath to that new node.

NodePath copy_to (const NodePath &other, int sort=0) const
 Functions exactly 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.

NodePath attach_new_node (PandaNode *node, int sort=0) 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) const
 Creates an ordinary PandaNode and attaches it below the current NodePath, returning a new NodePath that references it.

void remove_node ()
 Disconnects the referenced node from the scene graph.

void detach_node ()
 Disconnects the referenced node from its parent, but does not immediately delete it.

void output (ostream &out) const
 Writes a sensible description of the NodePath to the indicated output stream.

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.

const RenderStateget_state () const
 Returns the complete state object set on this node.

void set_state (const RenderState *state) const
 Changes the complete state object on this node.

ConstPointerTo< RenderStateget_state (const NodePath &other) const
 Returns the state changes that must be made to transition from the render state of this node to the render state of the other node.

void set_state (const NodePath &other, const RenderState *state) const
 Sets the state object on this node, relative to the other node.

ConstPointerTo< RenderStateget_net_state () const
const TransformStateget_transform () const
 Returns the complete transform object set on this node.

void set_transform (const TransformState *transform) const
 Changes the complete transform object on this node.

ConstPointerTo< TransformStateget_transform (const NodePath &other) const
 Returns the relative transform to this node from the other node; i.e.

void set_transform (const NodePath &other, const TransformState *transform) const
 Sets the transform object on this node, relative to the other node.

ConstPointerTo< TransformStateget_net_transform () const
void set_pos (float x, float y, float z)
 Sets the translation component of the transform, leaving rotation and scale untouched.

void set_pos (const LVecBase3f &pos)
 Sets the translation component of the transform, leaving rotation and scale untouched.

void set_x (float x)
void set_y (float y)
void set_z (float z)
LPoint3f get_pos () const
 Retrieves the translation component of the transform.

float get_x () const
float get_y () const
float get_z () const
void set_hpr (float h, float p, float r)
 Sets the rotation component of the transform, leaving translation and scale untouched.

void set_hpr (const LVecBase3f &hpr)
 Sets the rotation component of the transform, leaving translation and scale untouched.

void set_h (float h)
void set_p (float p)
void set_r (float r)
LVecBase3f get_hpr () const
 Retrieves the rotation component of the transform.

LVecBase3f get_hpr (float roll) const
 Retrieves the rotation component of the transform.

float get_h () const
float get_p () const
float get_r () const
void set_quat (const LQuaternionf &quat)
 Sets the rotation component of the transform, leaving translation and scale untouched.

LQuaternionf get_quat () const
 Retrieves the rotation component of the transform.

void set_scale (float scale)
 Sets the scale component of the transform, leaving translation and rotation untouched.

void set_scale (float sx, float sy, float sz)
void set_scale (const LVecBase3f &scale)
 Sets the scale component of the transform, leaving translation and rotation untouched.

void set_sx (float sx)
void set_sy (float sy)
void set_sz (float sz)
LVecBase3f get_scale () const
 Retrieves the scale component of the transform.

float get_sx () const
float get_sy () const
float get_sz () const
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_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_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)
 Completely replaces the transform with new translation, rotation, and scale components.

void set_pos_quat_scale (const LVecBase3f &pos, const LQuaternionf &quat, const LVecBase3f &scale)
 Completely replaces the transform with new translation, rotation, and scale components.

void set_mat (const LMatrix4f &mat)
 Directly sets an arbitrary 4x4 transform matrix.

void clear_mat ()
 Completely removes any transform from the referenced node.

bool has_mat () const
 Returns true if a non-identity transform matrix has been applied to the referenced node, false otherwise.

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.

bool has_color_scale () const
 Returns true if a color scale has been applied to the referenced node, false otherwise.

void clear_color_scale ()
 Completely removes any color scale from the referenced node.

void set_color_scale (const LVecBase4f &scale)
 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)
 Sets the color scale component of the transform.

void set_sr (float sr)
 Sets the red scale component of the transform.

void set_sg (float sg)
 Sets the alpha scale component of the transform.

void set_sb (float sb)
 Sets the blue scale component of the transform.

void set_sa (float sa)
 Sets the alpha scale component of the transform.

const LVecBase4f & get_color_scale () const
 Returns the complete color scale vector that has been applied to the bottom node, or all 1's (identity) if no scale has been applied.

float get_sr () const
 Gets the red scale component of the transform.

float get_sg () const
 Gets the green scale component of the transform.

float get_sb () const
 Gets the blue scale component of the transform.

float get_sa () const
 Gets the alpha scale component of the transform.

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 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 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_x (const NodePath &other, float x)
void set_y (const NodePath &other, float y)
void set_z (const NodePath &other, float z)
LPoint3f get_pos (const NodePath &other) const
 Returns the relative position of the referenced node as seen from the other node.

float get_x (const NodePath &other) const
float get_y (const NodePath &other) const
float get_z (const NodePath &other) const
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_h (const NodePath &other, float h)
void set_p (const NodePath &other, float p)
void set_r (const NodePath &other, float r)
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 NodePath &other, float roll) const
 Returns the relative orientation of the bottom node as seen from the other node.

float get_h (const NodePath &other) const
float get_p (const NodePath &other) const
float get_r (const NodePath &other) const
void set_quat (const NodePath &other, const LQuaternionf &quat)
 Sets the rotation component of the transform, relative to the other node.

LQuaternionf get_quat (const NodePath &other) const
 Returns the relative orientation of the bottom node as seen from the other node.

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, const LVecBase3f &scale)
 Sets the scale component of the transform, relative to the other node.

void set_sx (const NodePath &other, float sx)
void set_sy (const NodePath &other, float sy)
void set_sz (const NodePath &other, float sz)
LVecBase3f get_scale (const NodePath &other) const
 Returns the relative scale of the bottom node as seen from the other node.

float get_sx (const NodePath &other) const
 Returns the relative scale of the referenced node as seen from the other node.

float get_sy (const NodePath &other) const
float get_sz (const NodePath &other) const
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 (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_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 (const NodePath &other, const LVecBase3f &hpr, const LVecBase3f &scale)
 Sets the rotation and scale components of the transform, leaving translation untouched.

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.

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.

const 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.

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.

LPoint3f get_relative_point (const NodePath &other, const LVecBase3f &point)
 Given that the indicated point is in the coordinate system of the other node, returns the same point in this node's coordinate system.

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 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.

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.

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 clear_color ()
 Completely removes any color adjustment from the node.

bool has_color () const
 Returns true if a color has been applied to the given node, false otherwise.

Colorf get_color () const
 Returns the color that has been assigned to the node, or black if no color has been assigned.

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 clear_bin ()
 Completely removes any bin adjustment that may have been set via set_bin() from this particular node.

bool has_bin () const
 Returns true if the node has been assigned to the a particular rendering bin via set_bin(), false otherwise.

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.

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.

void set_texture (Texture *tex, int priority=0)
 Sets the geometry at this level and below to render using the indicated texture.

void set_texture_off (int priority=0)
 Sets the geometry at this level and below to render using no texture.

void clear_texture ()
 Completely removes any texture adjustment that may have been set via set_texture() or set_texture_off() from this particular node.

bool has_texture () const
 Returns true if a texture has been applied to this particular node via set_texture(), false otherwise.

bool has_texture_off () const
 Returns true if a texture has been specifically disabled on this particular node via set_texture_off(), false otherwise.

Textureget_texture () const
 Returns the texture that has been set on this particular node, or NULL if no texture has been set.

Texturefind_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).

TextureCollection find_all_textures () const
 Returns a list of a textures applied to geometry at this node and below.

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).

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 clear_material ()
 Completely removes any material adjustment that may have been set via set_material() from this particular node.

bool has_material () const
 Returns true if a material has been applied to this particular node via set_material(), false otherwise.

PointerTo< Materialget_material () const
 Returns the material that has been set on this particular node, or NULL if no material has been set.

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 clear_fog ()
 Completely removes any fog adjustment that may have been set via set_fog() or set_fog_off() from this particular node.

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.

Fogget_fog () const
 Returns the fog that has been set on this particular node, or NULL if no fog has been set.

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_render_mode_filled (int priority=0)
 Sets up the geometry at this level and below (unless overridden) to render in filled (i.e.

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().

bool has_render_mode () const
 Returns true if a render mode has been explicitly set on this particular node via set_render_mode_wireframe() or set_render_mode_filled(), false otherwise.

void set_two_sided (bool two_sided, int priority=0)
 Specifically sets or disables two-sided rendering mode on this particular node.

void clear_two_sided ()
 Completely removes any two-sided adjustment that may have been set on this node via set_two_sided().

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 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.

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 clear_depth_test ()
 Completely removes any depth-test adjustment that may have been set on this node via set_depth_test().

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 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, or if nothing has been specifically set.

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 clear_depth_write ()
 Completely removes any depth-write adjustment that may have been set on this node via set_depth_write().

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 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, or if nothing has been specifically set.

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.

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_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_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_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 (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 (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 clear_billboard ()
 Removes any billboard effect from the node.

bool has_billboard () const
 Returns true if there is any billboard effect on the node.

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 clear_compass ()
 Removes any compass effect from the node.

bool has_compass () const
 Returns true if there is any compass effect on the node.

void set_transparency (bool transparency, int priority=0)
 Specifically sets or disables transparent rendering mode on this particular node.

void clear_transparency ()
 Completely removes any transparency adjustment that may have been set on this node via set_transparency().

bool has_transparency () const
 Returns true if a transparent-rendering adjustment has been explicitly set on this particular node via set_transparency().

bool get_transparency () const
 Returns true if transparent rendering has been specifically set on this node via set_transparency(), or false if nontransparent rendering has been specifically set, or if nothing has been specifically set.

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 show ()
 Undoes the effect of a previous hide() on this node: makes the referenced node (and the entire subgraph below this node) visible to all cameras.

void show (DrawMask camera_mask)
 Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.

void hide ()
 Makes the referenced node (and the entire subgraph below this node) invisible to all cameras.

void hide (DrawMask camera_mask)
 Makes the referenced node invisible just to the cameras whose camera_mask shares the indicated bits.

bool is_hidden (DrawMask camera_mask=DrawMask::all_on()) const
 Returns true if the referenced node is hidden from the indicated camera(s) either directly, or because some ancestor is hidden.

NodePath get_hidden_ancestor (DrawMask camera_mask=DrawMask::all_on()) 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).

bool stash ()
 Removes the referenced node (and the entire subgraph below this node) from the scene graph in any normal sense.

bool unstash ()
 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.

bool is_stashed () const
 Returns true if the referenced node is stashed either directly, or because some ancestor is stashed.

NodePath get_stashed_ancestor () 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).

bool operator== (const NodePath &other) const
 Returns true if the two paths are equivalent; that is, if they contain the same list of nodes in the same order.

bool operator!= (const 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.

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.

bool verify_complete () const
 Returns true if all of the nodes described in the NodePath are connected and the top node is the top of the graph, or false otherwise.

void prepare_scene (GraphicsStateGuardianBase *gsg, bool force_retained_mode=false)
 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 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 hide_bounds ()
 Stops the rendering of the bounding volume begun with show_bounds().

PointerTo< BoundingVolumeget_bounds () const
 Returns a newly-allocated bounding volume containing the bottom node and all of its descendants.

void force_recompute_bounds ()
 Forces the recomputing of all the bounding volumes at every node in the subgraph beginning at this node and below.

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.

bool calc_tight_bounds (LPoint3f &min_point, LPoint3f &max_point)
 Calculates the minimum and maximum vertices of all Geoms at this NodePath's bottom node and below.

int flatten_light ()
 Lightly flattens out the hierarchy below this node by applying transforms, colors, and texture matrices from the arcs 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 arcs 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.

bool write_bam_file (const string &filename) const
 Writes the contents of this node and below out to a bam file with the indicated filename.


Static Public Member Functions

NodePath any_path (PandaNode *node)
 Returns a new NodePath that represents any arbitrary path from the root to the indicated node.

NodePath not_found ()
 Creates a NodePath with the ET_not_found error type set.

NodePath removed ()
 Creates a NodePath with the ET_removed error type set.

NodePath fail ()
 Creates a NodePath with the ET_fail error type set.

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.

int get_max_search_depth ()
 Returns the current setting of the search depth limit.

TypeHandle get_class_type ()
void init_type ()

Private Types

typedef pset< Texture * > Textures

Private Member Functions

void uncollapse_head () const
 Quietly and transparently uncollapses the _head pointer if it needs it.

ConstPointerTo< RenderStater_get_net_state (NodePathComponent *comp) const
 Recursively determines the net state chnages to the indicated component node from the root of the graph.

ConstPointerTo< RenderStater_get_partial_state (NodePathComponent *comp, int n) const
 Recursively determines the net state changes to the indicated component node from the nth node above it.

ConstPointerTo< TransformStater_get_net_transform (NodePathComponent *comp) const
 Recursively determines the net transform to the indicated component node from the root of the graph.

ConstPointerTo< TransformStater_get_partial_transform (NodePathComponent *comp, int n) const
 Recursively determines the net transform to the indicated component node from the nth node above it.

void find_matches (NodePathCollection &result, const string &approx_path_str, int max_matches) const
 Finds up to max_matches matches against the given path string from this node and deeper.

void find_matches (NodePathCollection &result, FindApproxPath &approx_path, int max_matches) const
 Finds up to max_matches matches against the given approx_path from this node and deeper.

void r_find_matches (NodePathCollection &result, const FindApproxLevel &level, int max_matches, int num_levels_remaining) const
 The recursive implementation of find_matches.

void r_adjust_all_priorities (PandaNode *node, int adjustment)
 The recursive implementation of adjust_all_priorities().

void r_force_recompute_bounds (PandaNode *node)
Texturer_find_texture (PandaNode *node, const RenderState *state, const GlobPattern &glob) const
void r_find_all_textures (PandaNode *node, const RenderState *state, Textures &textures) const
void r_prepare_scene (PandaNode *node, const RenderState *state, GraphicsStateGuardianBase *gsg, bool do_retained_mode)
 The recursive implementation of prepare_scene.


Static Private Member Functions

void find_common_ancestor (const NodePath &a, const NodePath &b, int &a_count, int &b_count)
 Walks up from both NodePaths to find the first node that both have in common, if any.


Private Attributes

PointerTo< NodePathComponent_head
ErrorType _error_type

Static Private Attributes

int _max_search_depth = 7000
TypeHandle _type_handle

Friends

class NodePathCollection
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 unqiuely 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 158 of file nodePath.h.


Member Typedef Documentation

typedef pset<Texture *> NodePath::Textures [private]
 

Definition at line 568 of file nodePath.h.


Member Enumeration Documentation

enum NodePath::ErrorType
 

Enumeration values:
ET_ok 
ET_not_found 
ET_removed 
ET_fail 

Definition at line 162 of file nodePath.h.


Constructor & Destructor Documentation

NodePath::NodePath  )  [inline]
 

This constructs an empty NodePath with no nodes.

Definition at line 32 of file nodePath.I.

References _head, PandaNode::get_generic_component(), and INLINE.

Referenced by detach_node(), get_sa(), get_sb(), and instance_to().

NodePath::NodePath const string &  top_node_name  )  [inline]
 

This constructs a new NodePath with a single node.

An ordinary, unattached PandaNode is created with the indicated name.

Definition at line 50 of file nodePath.I.

References _head, PandaNode::get_generic_component(), INLINE, node(), and NULL.

NodePath::NodePath PandaNode node  )  [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 78 of file nodePath.I.

References _head, PandaNode::get_generic_component(), and NULL.

NodePath::NodePath const NodePath &  parent,
PandaNode child_node
[inline]
 

Constructs a NodePath with the indicated parent NodePath and child node; the child node must be a stashed or unstashed child of the parent.

Definition at line 124 of file nodePath.I.

References _error_type, _head, and uncollapse_head().

NodePath::NodePath const NodePath &  copy  )  [inline]
 

Definition at line 145 of file nodePath.I.

References _error_type, ET_removed, and INLINE.


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 1234 of file nodePath.I.

NodePath NodePath::any_path PandaNode node  )  [inline, static]
 

Returns a new NodePath that represents any arbitrary path from the root to the indicated node.

This is the same thing that would be returned by NodePath(node), except that no warning is issued if the path is ambiguous.

Definition at line 103 of file nodePath.I.

NodePath NodePath::attach_new_node const string &  name,
int  sort = 0
const [inline]
 

Creates an ordinary PandaNode and attaches it below the current NodePath, returning a new NodePath that references it.

Definition at line 472 of file nodePath.I.

References INLINE, and set_hpr().

NodePath NodePath::attach_new_node PandaNode node,
int  sort = 0
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.

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 452 of file nodePath.cxx.

Referenced by NonlinearImager::get_internal_scene(), node(), PGButton::release(), PGEntry::set_num_lines(), WindowFramework::set_one_sided_reverse(), and wrt_reparent_to().

bool NodePath::calc_tight_bounds LPoint3f &  min_point,
LPoint3f &  max_point
 

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 3601 of file nodePath.cxx.

void NodePath::clear_billboard  ) 
 

Removes any billboard effect from the node.

Definition at line 3115 of file nodePath.cxx.

void NodePath::clear_bin  ) 
 

Completely removes any bin adjustment that may have been set via set_bin() from this particular node.

Definition at line 1859 of file nodePath.cxx.

References PandaNode::clear_attrib(), FogAttrib::get_class_type(), is_empty(), nassertv_always, and node().

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 1747 of file nodePath.cxx.

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 1051 of file nodePath.cxx.

Referenced by event_fkey().

void NodePath::clear_compass  ) 
 

Removes any compass effect from the node.

Definition at line 3165 of file nodePath.cxx.

void NodePath::clear_depth_test  ) 
 

Completely removes any depth-test adjustment that may have been set on this node via set_depth_test().

Definition at line 2772 of file nodePath.cxx.

References PandaNode::calc_tight_bounds(), is_empty(), TransformState::make_identity(), nassertr_always, and node().

void NodePath::clear_depth_write  ) 
 

Completely removes any depth-write adjustment that may have been set on this node via set_depth_write().

Definition at line 2867 of file nodePath.cxx.

References SceneGraphReducer::apply_attribs(), SceneGraphReducer::flatten(), is_empty(), nassertr_always, and node().

void NodePath::clear_fog  ) 
 

Completely removes any fog adjustment that may have been set via set_fog() or set_fog_off() from this particular node.

This allows whatever fogs might be otherwise affecting the geometry to show instead.

Definition at line 2361 of file nodePath.cxx.

void NodePath::clear_mat  )  [inline]
 

Completely removes any transform from the referenced node.

Definition at line 746 of file nodePath.I.

References get_pos().

void NodePath::clear_material  ) 
 

Completely removes any material adjustment that may have been set via set_material() from this particular node.

Definition at line 2237 of file nodePath.cxx.

References DepthWriteAttrib::get_class_type(), PandaNode::has_attrib(), is_empty(), nassertr_always, and node().

void NodePath::clear_render_mode  ) 
 

Completely removes any render mode adjustment that may have been set on this node via set_render_mode_wireframe() or set_render_mode_filled().

Definition at line 2508 of file nodePath.cxx.

References PandaNode::clear_attrib(), TransparencyAttrib::get_class_type(), is_empty(), nassertv_always, and node().

void NodePath::clear_texture  ) 
 

Completely removes any texture adjustment that may have been set via set_texture() or set_texture_off() from this particular node.

This allows whatever textures might be otherwise affecting the geometry to show instead.

Definition at line 1991 of file nodePath.cxx.

References is_empty(), CullFaceAttrib::M_cull_clockwise, CullFaceAttrib::M_cull_none, CullFaceAttrib::make(), CullFaceAttrib::Mode, nassertv_always, node(), and PandaNode::set_attrib().

void NodePath::clear_transparency  ) 
 

Completely removes any transparency adjustment that may have been set on this node via set_transparency().

The geometry at this level and below will subsequently be rendered either transparent or not, to whatever other nodes may have had set_transparency() on them.

Definition at line 3231 of file nodePath.cxx.

References NULL.

Referenced by event_fkey().

void NodePath::clear_two_sided  ) 
 

Completely removes any two-sided adjustment that may have been set on this node via set_two_sided().

The geometry at this level and below will subsequently be rendered either two-sided or one-sided, according to whatever other nodes may have had set_two_sided() on it, or according to the initial state otherwise.

Definition at line 2582 of file nodePath.cxx.

References _head, PandaNode::find_stashed(), NodePathComponent::get_next(), NodePathComponent::get_node(), and NULL.

int NodePath::compare_to const NodePath &  other  )  const [inline]
 

Returns a number less than zero if this NodePath sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

Two NodePaths are considered equivalent if they consist of exactly the same list of nodes in the same order. Otherwise, they are different; different NodePaths will be ranked in a consistent but undefined ordering; the ordering is useful only for placing the NodePaths in a sorted container like an STL set.

Definition at line 1499 of file nodePath.I.

NodePath NodePath::copy_to const NodePath &  other,
int  sort = 0
const
 

Functions exactly like instance_to(), except a deep copy is made of the referenced node and all of its descendents, which is then parented to the indicated node.

A NodePath to the newly created copy is returned.

Definition at line 414 of file nodePath.cxx.

References _error_type, PandaNode::detach(), ET_not_found, is_empty(), is_singleton(), nassertv, and uncollapse_head().

void NodePath::detach_node  ) 
 

Disconnects the referenced node from its parent, but does not immediately delete it.

The NodePath retains a pointer to the node. If there are no other instances to the node, this becomes a singleton NodePath; otherwise, this NodePath becomes the same as another arbitrary instance.

If the NodePath later goes out of scope or is reassigned to something else, this will have the same effect as remove_node().

Definition at line 536 of file nodePath.cxx.

References _error_type, CPT, ET_ok, get_parent(), get_transform(), has_parent(), is_empty(), nassertv, nassertv_always, NodePath(), and set_transform().

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 2936 of file nodePath.cxx.

References _head, NodePathComponent::get_length(), NodePathComponent::get_next(), is_empty(), nassertv, NULL, and uncollapse_head().

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 2976 of file nodePath.cxx.

References CPT, NodePathComponent::get_next(), NodePathComponent::get_node(), PandaNode::get_state(), RenderState::make_empty(), NULL, and r_get_net_state().

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 3012 of file nodePath.cxx.

References CPT, NodePathComponent::get_next(), NodePathComponent::get_node(), PandaNode::get_transform(), TransformState::make_identity(), NULL, and r_get_net_transform().

NodePath NodePath::fail  )  [inline, static]
 

Creates a NodePath with the ET_fail error type set.

Definition at line 211 of file nodePath.I.

References _head, INLINE, NULL, and uncollapse_head().

Referenced by get_children(), get_error_type(), instance_to(), node(), reparent_to(), and WorkingNodePath::~WorkingNodePath().

NodePath NodePath::find const string &  path  )  const
 

Searches for a node below the referenced node that matches the indicated string.

Returns the shortest match found, if any, or an empty NodePath if no match can be found.

Definition at line 182 of file nodePath.cxx.

Referenced by SpriteParticleRenderer::make_copy(), and NurbsVertex::set_space().

NodePathCollection NodePath::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.

The shortest paths will be listed first.

Definition at line 238 of file nodePath.cxx.

References _head, is_empty(), nassertv, nassertv_always, PandaNode::reparent(), uncollapse_head(), and verify_complete().

NodePathCollection NodePath::find_all_paths_to PandaNode node  )  const
 

Returns the set of all NodePaths that extend from this NodePath down to the indicated node.

The shortest paths will be listed first.

Definition at line 259 of file nodePath.cxx.

References get_transform(), is_empty(), nassertv, nassertv_always, reparent_to(), set_transform(), and verify_complete().

TextureCollection NodePath::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).

Definition at line 2149 of file nodePath.cxx.

TextureCollection NodePath::find_all_textures  )  const
 

Returns a list of a textures applied to geometry at this node and below.

Definition at line 2124 of file nodePath.cxx.

References DCAST, AlphaTestAttrib::get_mode(), RenderAttrib::M_none, and NULL.

void NodePath::find_common_ancestor const NodePath &  a,
const NodePath &  b,
int &  a_count,
int &  b_count
[static, private]
 

Walks up from both NodePaths to find the first node that both have in common, if any.

Fills a_count and b_count with the number of nodes below the common node in each path.

Definition at line 3837 of file nodePath.cxx.

void NodePath::find_matches NodePathCollection result,
FindApproxPath approx_path,
int  max_matches
const [private]
 

Finds up to max_matches matches against the given approx_path from this node and deeper.

The max_matches count indicates the maximum number of matches to return, or -1 not to limit the number returned.

Definition at line 4008 of file nodePath.cxx.

void NodePath::find_matches NodePathCollection result,
const string &  approx_path_str,
int  max_matches
const [private]
 

Finds up to max_matches matches against the given path string from this node and deeper.

The max_matches count indicates the maximum number of matches to return, or -1 not to limit the number returned.

Definition at line 3977 of file nodePath.cxx.

Referenced by get_children(), and set_billboard_axis().

NodePath NodePath::find_path_to PandaNode node  )  const
 

Searches for the indicated node below this node and returns the shortest NodePath that connects them.

Definition at line 206 of file nodePath.cxx.

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 2108 of file nodePath.cxx.

int NodePath::flatten_light  ) 
 

Lightly flattens out the hierarchy below this node by applying transforms, colors, and texture matrices from the arcs 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.

Particularly, 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 arcs 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 arcs.

Definition at line 3660 of file nodePath.cxx.

int NodePath::flatten_medium  ) 
 

A more thorough flattening than flatten_light(), this first applies all the transforms, colors, and texture matrices from the arcs 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 perforamance over flatten_light() because the number of nodes in the scene graph is reduced.

If max_children is specified, it represents the maximum number of children a node is allowed to have and still be flattened. Normally, this is 1; we don't typically want to flatten a node that has multiple children. However, sometimes this may be desirable; set this parameter to control the limit. If this is set to -1, there is no limit.

The return value is the number of arcs removed.

Definition at line 3715 of file nodePath.cxx.

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 3757 of file nodePath.cxx.

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 3556 of file nodePath.cxx.

int NodePath::get_bin_draw_order  )  const
 

Returns the drawing order associated with the bin that this particular node was assigned to via set_bin(), or 0 if no bin was assigned.

See set_bin() and has_bin().

Definition at line 1922 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), FogAttrib::get_class_type(), FogAttrib::get_fog(), is_empty(), nassertr_always, node(), and NULL.

string NodePath::get_bin_name  )  const
 

Returns the name of the bin that this particular node was assigned to via set_bin(), or the empty string if no bin was assigned.

See set_bin() and has_bin().

Definition at line 1895 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), FogAttrib::get_class_type(), is_empty(), FogAttrib::is_off(), nassertr_always, node(), and NULL.

PointerTo< BoundingVolume > NodePath::get_bounds  )  const
 

Returns a newly-allocated bounding volume containing the bottom node and all of its descendants.

This is the bounding volume on the bottom arc, converted to the local coordinate space of the node.

Definition at line 3520 of file nodePath.cxx.

Referenced by PandaFramework::event_esc().

NodePath NodePath::get_child int  n  )  const [inline]
 

Returns a NodePath representing the nth child of the referenced node.

Definition at line 419 of file nodePath.I.

References INLINE, is_empty(), nassertv_always, node(), and PandaNode::set_transform().

Referenced by PandaFramework::event_b(), and PandaFramework::set_texture().

NodePathCollection NodePath::get_children  )  const
 

Returns the set of all child nodes of the referenced node.

Definition at line 150 of file nodePath.cxx.

References fail(), find_matches(), NodePathCollection::get_path(), NodePathCollection::is_empty(), is_empty(), nassertr_always, not_found(), and path.

TypeHandle NodePath::get_class_type void   )  [inline, static]
 

Definition at line 581 of file nodePath.h.

Colorf NodePath::get_color void   )  const
 

Returns the color that has been assigned to the node, or black if no color has been assigned.

Definition at line 1779 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), MaterialAttrib::get_class_type(), is_empty(), MaterialAttrib::is_off(), nassertr_always, node(), and NULL.

const LVecBase4f & NodePath::get_color_scale  )  const
 

Returns the complete color scale vector that has been applied to the bottom node, or all 1's (identity) if no scale has been applied.

Definition at line 1085 of file nodePath.cxx.

Referenced by get_r(), get_sx(), get_sz(), get_x(), get_z(), and set_scale().

bool NodePath::get_depth_test  )  const
 

Returns true if depth-test rendering has been specifically set on this node via set_depth_test(), or false if depth-test rendering has been specifically disabled, or if nothing has been specifically set.

See also has_depth_test().

Definition at line 2816 of file nodePath.cxx.

References SceneGraphReducer::apply_attribs(), is_empty(), nassertr_always, and node().

bool NodePath::get_depth_write  )  const
 

Returns true if depth-write rendering has been specifically set on this node via set_depth_write(), or false if depth-write rendering has been specifically disabled, or if nothing has been specifically set.

See also has_depth_write().

Definition at line 2911 of file nodePath.cxx.

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 1157 of file nodePath.I.

NodePath::ErrorType NodePath::get_error_type  )  const [inline]
 

If is_empty() is true, this returns a code that represents the reason why the NodePath is empty.

Definition at line 322 of file nodePath.I.

References _head, fail(), has_parent(), INLINE, and nassertr.

Fog * NodePath::get_fog  )  const
 

Returns the fog that has been set on this particular node, or NULL if no fog has been set.

This is not necessarily the fog that will be applied to the geometry at or below this level, as another fog at a higher or lower level may override.

Definition at line 2447 of file nodePath.cxx.

References is_empty(), CompassEffect::make(), nassertv_always, node(), and PandaNode::set_effect().

float NodePath::get_h const NodePath &  other  )  const [inline]
 

Definition at line 998 of file nodePath.I.

float NodePath::get_h  )  const [inline]
 

Definition at line 639 of file nodePath.I.

NodePath NodePath::get_hidden_ancestor DrawMask  camera_mask = DrawMask::all_on()  )  const
 

Returns the NodePath at or above the referenced node that is hidden to the indicated camera(s), or an empty NodePath if no ancestor of the referenced node is hidden (and the node should be visible).

Definition at line 3309 of file nodePath.cxx.

References NULL.

Referenced by get_p(), and PandaFramework::set_texture().

LVecBase3f NodePath::get_hpr const NodePath &  other,
float  roll
const
 

Returns the relative orientation of the bottom node as seen from the other node.

Definition at line 1307 of file nodePath.cxx.

References get_mat().

LVecBase3f NodePath::get_hpr const NodePath &  other  )  const
 

Returns the relative orientation of the bottom node as seen from the other node.

Definition at line 1289 of file nodePath.cxx.

LVecBase3f NodePath::get_hpr float  roll  )  const
 

Retrieves the rotation component of the transform.

Definition at line 828 of file nodePath.cxx.

References ColorScaleAttrib::get_class_type(), PandaNode::has_attrib(), is_empty(), nassertr_always, and node().

LVecBase3f NodePath::get_hpr  )  const
 

Retrieves the rotation component of the transform.

Definition at line 812 of file nodePath.cxx.

References is_empty(), TransformState::make_mat(), nassertv_always, and set_transform().

Referenced by has_mat(), and ls().

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).

There are a few special case circumstances that can cause the key for a particular instance to be changed. These all involve different instances being collapsed into the same instance by some scene graph operation (for instance, detaching a node below an instanced node).

Definition at line 387 of file nodePath.I.

References INLINE, is_empty(), nassertv_always, node(), and PandaNode::set_state().

const LMatrix4f & NodePath::get_mat const NodePath &  other  )  const
 

Returns the matrix that describes the coordinate space of the bottom node, relative to the other path's bottom node's coordinate space.

Definition at line 1570 of file nodePath.cxx.

References is_empty(), TextureAttrib::make_off(), nassertv_always, node(), and PandaNode::set_attrib().

const LMatrix4f & NodePath::get_mat  )  const [inline]
 

Returns the transform matrix that has been applied to the referenced node, or the identity matrix if no matrix has been applied.

Definition at line 780 of file nodePath.I.

References INLINE, and set_scale().

Referenced by ProjectionScreen::cull_callback(), get_hpr(), Trackball::get_mat(), GLGraphicsStateGuardian::issue_alpha_test(), CRGraphicsStateGuardian::issue_color_write(), GLGraphicsStateGuardian::issue_cull_face(), DXGraphicsStateGuardian8::issue_depth_write(), CRGraphicsStateGuardian::issue_depth_write(), BaseIntegrator::precompute_angular_matrices(), ProjectionScreen::recompute_geom(), ProjectionScreen::recompute_if_stale(), ProjectionScreen::regenerate_screen(), set_fog_off(), and set_quat().

PointerTo< Material > NodePath::get_material  )  const
 

Returns the material that has been set on this particular node, or NULL if no material has been set.

This is not necessarily the material that will be applied to the geometry at or below this level, as another material at a higher or lower level may override.

This function returns a copy of the given material, to allow changes, if desired. Once changes are made, they should be reapplied via set_material().

Definition at line 2292 of file nodePath.cxx.

References set_pos().

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 277 of file nodePath.I.

References _head, INLINE, and is_empty().

Referenced by NodePathCollection::get_path().

ConstPointerTo< RenderState > NodePath::get_net_state  )  const [inline]
 

Referenced by set_color().

ConstPointerTo< TransformState > NodePath::get_net_transform  )  const [inline]
 

Referenced by Fog::output().

PandaNode * NodePath::get_node int  index  )  const
 

Returns the nth node of the path, where 0 is the referenced (bottom) node and get_num_nodes() - 1 is the top node.

This requires iterating through the path.

Definition at line 93 of file nodePath.cxx.

Referenced by WorkingNodePath::get_num_nodes().

int NodePath::get_num_children  )  const [inline]
 

Returns the number of children of the referenced node.

Definition at line 403 of file nodePath.I.

Referenced by PandaFramework::event_b(), and PandaFramework::set_texture().

int NodePath::get_num_nodes  )  const
 

Returns the number of nodes in the path.

Definition at line 70 of file nodePath.cxx.

float NodePath::get_p const NodePath &  other  )  const [inline]
 

Definition at line 1003 of file nodePath.I.

References get_hidden_ancestor(), INLINE, and is_empty().

float NodePath::get_p  )  const [inline]
 

Definition at line 644 of file nodePath.I.

NodePath NodePath::get_parent  )  const [inline]
 

Returns the NodePath to the parent of the referenced node: that is, this NodePath, shortened by one node.

Definition at line 452 of file nodePath.I.

References get_pos().

Referenced by detach_node(), PandaFramework::event_i(), PandaFramework::event_l(), PandaFramework::event_t(), get_r(), set_fog_off(), and set_quat().

LPoint3f NodePath::get_pos const NodePath &  other  )  const
 

Returns the relative position of the referenced node as seen from the other node.

Definition at line 1211 of file nodePath.cxx.

LPoint3f NodePath::get_pos  )  const
 

Retrieves the translation component of the transform.

Definition at line 750 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), TransformState::make_pos_hpr_scale(), nassertv_always, and set_transform().

Referenced by clear_mat(), get_parent(), set_quat(), set_sx(), and set_sz().

LQuaternionf NodePath::get_quat const NodePath &  other  )  const
 

Returns the relative orientation of the bottom node as seen from the other node.

Definition at line 1364 of file nodePath.cxx.

References Colorf, and set_color().

LQuaternionf NodePath::get_quat  )  const
 

Retrieves the rotation component of the transform.

Definition at line 861 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), ColorScaleAttrib::get_class_type(), ColorScaleAttrib::get_scale(), is_empty(), nassertr_always, node(), and NULL.

float NodePath::get_r const NodePath &  other  )  const [inline]
 

Definition at line 1008 of file nodePath.I.

References get_parent(), INLINE, is_singleton(), nassertr, and node().

float NodePath::get_r  )  const [inline]
 

Definition at line 649 of file nodePath.I.

References get_color_scale(), INLINE, and set_color_scale().

LPoint3f NodePath::get_relative_point const NodePath &  other,
const LVecBase3f &  point
 

Given that the indicated point is in the coordinate system of the other node, returns the same point in this node's coordinate system.

Definition at line 1611 of file nodePath.cxx.

float NodePath::get_sa  )  const [inline]
 

Gets the alpha scale component of the transform.

Definition at line 911 of file nodePath.I.

References INLINE, NodePath(), and set_billboard_point_world().

float NodePath::get_sb  )  const [inline]
 

Gets the blue scale component of the transform.

Definition at line 898 of file nodePath.I.

References INLINE, NodePath(), and set_billboard_point_eye().

LVecBase3f NodePath::get_scale const NodePath &  other  )  const
 

Returns the relative scale of the bottom node as seen from the other node.

Definition at line 1442 of file nodePath.cxx.

References DCAST, ColorAttrib::get_color(), ColorAttrib::get_color_type(), NULL, and ColorAttrib::T_flat.

LVecBase3f NodePath::get_scale  )  const
 

Retrieves the scale component of the transform.

Definition at line 920 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), nassertv_always, set_pos(), and set_transform().

Referenced by get_state().

float NodePath::get_sg  )  const [inline]
 

Gets the green scale component of the transform.

Definition at line 885 of file nodePath.I.

float NodePath::get_sr  )  const [inline]
 

Gets the red scale component of the transform.

Definition at line 872 of file nodePath.I.

NodePath NodePath::get_stashed_ancestor  )  const
 

Returns the NodePath at or above the referenced node that is stashed, or an empty NodePath if no ancestor of the referenced node is stashed (and the node should be visible).

Definition at line 3340 of file nodePath.cxx.

ConstPointerTo< RenderState > NodePath::get_state const NodePath &  other  )  const
 

Returns the state changes that must be made to transition from the render state of this node to the render state of the other node.

Definition at line 592 of file nodePath.cxx.

References TransformState::get_pos(), get_transform(), is_empty(), and nassertr_always.

const RenderState * NodePath::get_state  )  const [inline]
 

Returns the complete state object set on this node.

Definition at line 518 of file nodePath.I.

References get_scale(), and INLINE.

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 1038 of file nodePath.I.

float NodePath::get_sx  )  const [inline]
 

Definition at line 674 of file nodePath.I.

References get_color_scale().

float NodePath::get_sy const NodePath &  other  )  const [inline]
 

Definition at line 1043 of file nodePath.I.

References INLINE, is_singleton(), and nassertr.

float NodePath::get_sy  )  const [inline]
 

Definition at line 679 of file nodePath.I.

References INLINE.

float NodePath::get_sz const NodePath &  other  )  const [inline]
 

Definition at line 1048 of file nodePath.I.

float NodePath::get_sz  )  const [inline]
 

Definition at line 684 of file nodePath.I.

References get_color_scale().

Texture * NodePath::get_texture void   )  const
 

Returns the texture that has been set on this particular node, or NULL if no texture has been set.

This is not necessarily the texture that will be applied to the geometry at or below this level, as another texture at a higher or lower level may override.

See also find_texture().

Definition at line 2081 of file nodePath.cxx.

PandaNode * NodePath::get_top_node  )  const
 

Returns the top node of the path, or NULL if the path is empty.

This requires iterating through the path.

Definition at line 123 of file nodePath.cxx.

References _head, NodePathCollection::add_path(), PandaNode::get_children(), PandaNode::get_component(), is_empty(), nassertr_always, and node().

ConstPointerTo< TransformState > NodePath::get_transform const NodePath &  other  )  const
 

Returns the relative transform to this node from the other node; i.e.

the transformation of this node as seen from the other node.

Definition at line 651 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), nassertr, and nassertr_always.

const TransformState * NodePath::get_transform  )  const [inline]
 

Returns the complete transform object set on this node.

Definition at line 560 of file nodePath.I.

References PandaNode::clear_transform(), INLINE, is_empty(), nassertv_always, and node().

Referenced by detach_node(), find_all_paths_to(), get_pos(), get_scale(), get_state(), get_transform(), look_at(), output(), set_hpr(), set_pos(), set_pos_hpr_scale(), set_state(), set_transform(), set_x(), and set_z().

bool NodePath::get_transparency  )  const
 

Returns true if transparent rendering has been specifically set on this node via set_transparency(), or false if nontransparent rendering has been specifically set, or if nothing has been specifically set.

See also has_transparency(). This does not necessarily imply that the geometry will or will not be rendered transparent, as there may be other nodes that override.

Definition at line 3281 of file nodePath.cxx.

References RenderState::compose(), CPT, DCAST_INTO_V, TextureAttrib::get_class_type(), GeomNode::get_geom_state(), GeomNode::get_num_geoms(), PandaNode::is_geom_node(), and NULL.

bool NodePath::get_two_sided  )  const
 

Returns true if two-sided rendering has been specifically set on this node via set_two_sided(), or false if one-sided rendering has been specifically set, or if nothing has been specifically set.

See also has_two_sided(). This does not necessarily imply that the geometry will or will not be rendered two-sided, as there may be other nodes that override.

Definition at line 2630 of file nodePath.cxx.

References length, and NULL.

float NodePath::get_x const NodePath &  other  )  const [inline]
 

Definition at line 968 of file nodePath.I.

float NodePath::get_x  )  const [inline]
 

Definition at line 609 of file nodePath.I.

References get_color_scale(), and INLINE.

float NodePath::get_y const NodePath &  other  )  const [inline]
 

Definition at line 973 of file nodePath.I.

References INLINE.

float NodePath::get_y  )  const [inline]
 

Definition at line 614 of file nodePath.I.

float NodePath::get_z const NodePath &  other  )  const [inline]
 

Definition at line 978 of file nodePath.I.

References is_empty(), nassertv_always, node(), and PandaNode::set_draw_mask().

float NodePath::get_z  )  const [inline]
 

Definition at line 619 of file nodePath.I.

References get_color_scale(), INLINE, and set_color_scale().

bool NodePath::has_billboard  )  const
 

Returns true if there is any billboard effect on the node.

Definition at line 3131 of file nodePath.cxx.

bool NodePath::has_bin  )  const
 

Returns true if the node has been assigned to the a particular rendering bin via set_bin(), false otherwise.

Definition at line 1877 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), FogAttrib::get_class_type(), is_empty(), FogAttrib::is_off(), nassertr_always, node(), and NULL.

bool NodePath::has_color  )  const
 

Returns true if a color has been applied to the given node, false otherwise.

Definition at line 1763 of file nodePath.cxx.

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 1029 of file nodePath.cxx.

bool NodePath::has_compass  )  const
 

Returns true if there is any compass effect on the node.

Definition at line 3181 of file nodePath.cxx.

bool NodePath::has_depth_test  )  const
 

Returns true if a depth-test adjustment has been explicitly set on this particular node via set_depth_test().

If this returns true, then get_depth_test() may be called to determine which has been set.

Definition at line 2794 of file nodePath.cxx.

bool NodePath::has_depth_write  )  const
 

Returns true if a depth-write adjustment has been explicitly set on this particular node via set_depth_write().

If this returns true, then get_depth_write() may be called to determine which has been set.

Definition at line 2889 of file nodePath.cxx.

bool NodePath::has_fog  )  const
 

Returns true if a fog has been applied to this particular node via set_fog(), false otherwise.

This is not the same thing as asking whether the geometry at this node will be rendered with fog, as there may be a fog in effect from a higher or lower level.

Definition at line 2385 of file nodePath.cxx.

References CPT, is_empty(), BillboardEffect::make(), nassertv_always, node(), and PandaNode::set_effect().

bool NodePath::has_fog_off  )  const
 

Returns true if a fog has been specifically disabled on this particular node via set_fog_off(), false otherwise.

This is not the same thing as asking whether the geometry at this node will be rendered unfogged, as there may be a fog in effect from a higher or lower level.

Definition at line 2416 of file nodePath.cxx.

bool NodePath::has_mat  )  const [inline]
 

Returns true if a non-identity transform matrix has been applied to the referenced node, false otherwise.

Definition at line 762 of file nodePath.I.

References get_hpr().

bool NodePath::has_material  )  const
 

Returns true if a material has been applied to this particular node via set_material(), false otherwise.

Definition at line 2253 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), DepthWriteAttrib::get_class_type(), DepthWriteAttrib::get_mode(), is_empty(), DepthWriteAttrib::M_off, nassertr_always, node(), and NULL.

bool NodePath::has_parent  )  const [inline]
 

Returns true if the referenced node has a parent; i.e.

the NodePath chain contains at least two nodes.

Definition at line 437 of file nodePath.I.

Referenced by detach_node(), PandaFramework::event_i(), PandaFramework::event_l(), PandaFramework::event_t(), and get_error_type().

bool NodePath::has_render_mode  )  const
 

Returns true if a render mode has been explicitly set on this particular node via set_render_mode_wireframe() or set_render_mode_filled(), false otherwise.

Definition at line 2528 of file nodePath.cxx.

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 2015 of file nodePath.cxx.

References PandaNode::clear_attrib(), CullFaceAttrib::get_class_type(), is_empty(), nassertv_always, and node().

bool NodePath::has_texture_off  )  const
 

Returns true if a texture has been specifically disabled on this particular node via set_texture_off(), false otherwise.

This is not the same thing as asking whether the geometry at this node will be rendered untextured, as there may be a texture in effect from a higher or lower level.

Definition at line 2046 of file nodePath.cxx.

References DCAST, CullFaceAttrib::get_actual_mode(), PandaNode::get_attrib(), CullFaceAttrib::get_class_type(), is_empty(), CullFaceAttrib::M_cull_none, nassertr_always, node(), and NULL.

bool NodePath::has_transparency  )  const
 

Returns true if a transparent-rendering adjustment has been explicitly set on this particular node via set_transparency().

If this returns true, then get_transparency() may be called to determine whether transparency has been explicitly enabled or explicitly disabled for this node.

Definition at line 3255 of file nodePath.cxx.

References RenderState::compose(), CPT, DCAST, TextureAttrib::get_class_type(), GeomNode::get_geom_state(), TextureAttrib::get_texture(), PointerToArray< PointerTo< Texture > >::insert(), and NULL.

bool NodePath::has_two_sided  )  const
 

Returns true if a two-sided adjustment has been explicitly set on this particular node via set_two_sided().

If this returns true, then get_two_sided() may be called to determine which has been set.

Definition at line 2604 of file nodePath.cxx.

void NodePath::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.

Definition at line 1655 of file nodePath.cxx.

References NULL.

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.

void NodePath::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.

Definition at line 1132 of file nodePath.cxx.

void NodePath::heads_up 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 948 of file nodePath.I.

References INLINE, is_empty(), nassertv_always, node(), and PandaNode::set_draw_mask().

Referenced by set_hpr_scale().

void NodePath::hide DrawMask  camera_mask  )  [inline]
 

Makes the referenced node invisible just to the cameras whose camera_mask shares the indicated bits.

That is, this clears the indicated bits from the node's draw mask.

Definition at line 1314 of file nodePath.I.

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 1294 of file nodePath.I.

Referenced by PandaFramework::reset_frame_rate().

void NodePath::hide_bounds  ) 
 

Stops the rendering of the bounding volume begun with show_bounds().

Definition at line 3500 of file nodePath.cxx.

Referenced by PandaFramework::set_lighting().

void NodePath::init_type void   )  [inline, static]
 

Definition at line 584 of file nodePath.h.

NodePath NodePath::instance_to const NodePath &  other,
int  sort = 0
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.

Definition at line 355 of file nodePath.cxx.

References _head, PandaNode::attach(), fail(), is_empty(), nassertr, nassertr_always, NodePath(), NULL, uncollapse_head(), and verify_complete().

Referenced by event_W(), and wrt_reparent_to().

NodePath NodePath::instance_under_node const NodePath &  other,
const string &  name,
int  sort = 0
const
 

Behaves like instance_to(), but implicitly creates a new node to instance the geometry under, and returns a NodePath to that new node.

This allows the programmer to set a unique state and/or transform on this instance.

Definition at line 387 of file nodePath.cxx.

References _error_type, PandaNode::detach(), ET_not_found, is_empty(), is_singleton(), nassertv, removed(), and uncollapse_head().

bool NodePath::is_empty  )  const [inline]
 

Returns true if the NodePath contains no nodes.

Definition at line 290 of file nodePath.I.

References _head, INLINE, and nassertr_always.

Referenced by clear_bin(), clear_depth_test(), clear_depth_write(), clear_material(), clear_render_mode(), clear_texture(), copy_to(), ProjectionScreen::cull_callback(), detach_node(), do_billboard_axis(), PandaFramework::do_enable_default_keys(), PandaFramework::event_esc(), PandaFramework::event_f(), find_all_matches(), find_all_paths_to(), WindowFramework::get_aspect_2d(), get_bin_draw_order(), get_bin_name(), WindowFramework::get_camera_group(), get_child(), get_children(), get_color(), get_depth_test(), get_fog(), get_hpr(), get_key(), DisplayRegion::get_layer(), Trackball::get_mat(), get_mat(), get_max_search_depth(), get_p(), get_pos(), get_quat(), get_scale(), get_state(), PandaFramework::get_texture(), get_top_node(), get_transform(), get_z(), has_bin(), has_fog(), has_material(), has_texture(), has_texture_off(), heads_up(), instance_to(), instance_under_node(), look_at(), SpriteParticleRenderer::make_copy(), node(), output(), EggLoader::reparent_decals(), reparent_to(), set_billboard_axis(), set_billboard_point_eye(), set_bin(), set_color_off(), set_depth_test(), set_depth_write(), set_fog_off(), set_hpr(), set_hpr_scale(), PandaFramework::set_lighting(), set_mat(), set_material(), set_p(), set_pos(), set_pos_hpr(), set_pos_hpr_scale(), set_quat(), set_r(), set_render_mode_filled(), set_render_mode_wireframe(), set_scale(), set_state(), set_sx(), set_sz(), set_texture_off(), set_transform(), PandaFramework::set_two_sided(), set_x(), set_z(), wrt_reparent_to(), and SpriteParticleRenderer::~SpriteParticleRenderer().

bool NodePath::is_hidden DrawMask  camera_mask = DrawMask::all_on()  )  const [inline]
 

Returns true if the referenced node is hidden from the indicated camera(s) either directly, or because some ancestor is hidden.

Definition at line 1332 of file nodePath.I.

Referenced by PandaFramework::reset_frame_rate().

bool NodePath::is_singleton  )  const [inline]
 

Returns true if the NodePath contains exactly one node.

Definition at line 306 of file nodePath.I.

References _head.

Referenced by copy_to(), get_r(), get_sy(), and instance_under_node().

bool NodePath::is_stashed  )  const [inline]
 

Returns true if the referenced node is stashed either directly, or because some ancestor is stashed.

Definition at line 1415 of file nodePath.I.

void NodePath::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.

Definition at line 1629 of file nodePath.cxx.

References NULL.

void NodePath::look_at const NodePath &  other,
float  x,
float  y,
float  z
[inline]
 

Sets the hpr on this NodePath so that it rotates to face the indicated point in space, which is relative to the other NodePath.

Definition at line 1123 of file nodePath.I.

References _head.

void NodePath::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.

Definition at line 1109 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), and nassertr_always.

void NodePath::look_at float  x,
float  y,
float  z
[inline]
 

Sets the transform on this NodePath so that it rotates to face the indicated point in space.

This will overwrite any previously existing scale on the node, although it will preserve any translation.

Definition at line 931 of file nodePath.I.

References INLINE, is_empty(), nassertv_always, node(), and r_adjust_all_priorities().

Referenced by set_pos_hpr(), and set_sa().

void NodePath::ls ostream &  out,
int  indent_level = 0
const [inline]
 

Lists the hierarchy at and below the referenced node.

Definition at line 501 of file nodePath.I.

void NodePath::ls  )  const [inline]
 

Lists the hierarchy at and below the referenced node.

Definition at line 488 of file nodePath.I.

References get_hpr().

Referenced by PandaFramework::event_f().

PandaNode * NodePath::node  )  const [inline]
 

Returns the referenced node of the path.

Definition at line 335 of file nodePath.I.

References attach_new_node(), fail(), INLINE, is_empty(), nassertr, nassertr_always, and verify_complete().

Referenced by clear_bin(), clear_depth_test(), clear_depth_write(), clear_material(), clear_render_mode(), clear_texture(), ProjectionScreen::cull_callback(), PandaFramework::event_i(), event_L(), PandaFramework::event_l(), get_bin_draw_order(), get_bin_name(), get_child(), get_color(), get_depth_test(), get_fog(), get_hpr(), get_key(), DisplayRegion::get_layer(), get_mat(), get_quat(), get_r(), get_top_node(), get_transform(), get_z(), has_bin(), has_fog(), has_material(), has_texture(), has_texture_off(), heads_up(), look_at(), NodePath(), EggLoader::reparent_decals(), PandaFramework::reset_frame_rate(), set_bin(), set_color(), set_color_off(), set_depth_test(), set_depth_write(), set_hpr_scale(), set_mat(), set_material(), set_pos(), set_pos_hpr(), set_render_mode_filled(), set_render_mode_wireframe(), set_scale(), set_sz(), PandaFramework::set_texture(), set_texture_off(), and set_transform().

NodePath NodePath::not_found  )  [inline, static]
 

Creates a NodePath with the ET_not_found error type set.

Definition at line 177 of file nodePath.I.

References INLINE.

Referenced by get_children().

bool NodePath::operator!= const NodePath &  other  )  const [inline]
 

Returns true if the two paths are not equivalent.

Definition at line 1445 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 1466 of file nodePath.I.

void NodePath::operator= const NodePath &  copy  )  [inline]
 

Definition at line 160 of file nodePath.I.

References _error_type, ET_fail, and INLINE.

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 1432 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 555 of file nodePath.cxx.

References get_transform(), is_empty(), nassertv_always, set_pos(), and set_transform().

void NodePath::prepare_scene GraphicsStateGuardianBase gsg,
bool  force_retained_mode = false
 

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.

If force_retained_mode is true, retained mode is set on the geometry encountered, regardless of the setting of the retained-mode Config variable. Otherwise, retained mode is set only if the retained-mode Config variable is true.

Definition at line 3459 of file nodePath.cxx.

void NodePath::r_adjust_all_priorities PandaNode node,
int  adjustment
[private]
 

The recursive implementation of adjust_all_priorities().

This walks through the subgraph defined by the indicated node and below.

Definition at line 4085 of file nodePath.cxx.

Referenced by look_at().

void NodePath::r_find_all_textures PandaNode node,
const RenderState state,
NodePath::Textures textures
const [private]
 

Definition at line 4194 of file nodePath.cxx.

Referenced by set_color().

void NodePath::r_find_matches NodePathCollection result,
const FindApproxLevel level,
int  max_matches,
int  num_levels_remaining
const [private]
 

The recursive implementation of find_matches.

Definition at line 4031 of file nodePath.cxx.

Referenced by NodePathCollection::get_path(), and set_billboard_point_eye().

Texture * NodePath::r_find_texture PandaNode node,
const RenderState state,
const GlobPattern glob
const [private]
 

Definition at line 4143 of file nodePath.cxx.

void NodePath::r_force_recompute_bounds PandaNode node  )  [private]
 

Definition at line 4113 of file nodePath.cxx.

Referenced by set_depth_test().

ConstPointerTo< RenderState > NodePath::r_get_net_state NodePathComponent comp  )  const [private]
 

Recursively determines the net state chnages to the indicated component node from the root of the graph.

Definition at line 3883 of file nodePath.cxx.

Referenced by do_billboard_point_eye().

ConstPointerTo< TransformState > NodePath::r_get_net_transform NodePathComponent comp  )  const [private]
 

Recursively determines the net transform to the indicated component node from the root of the graph.

Definition at line 3927 of file nodePath.cxx.

Referenced by do_billboard_point_world().

ConstPointerTo< RenderState > NodePath::r_get_partial_state NodePathComponent comp,
int  n
const [private]
 

Recursively determines the net state changes to the indicated component node from the nth node above it.

If n exceeds the length of the path, this returns the net transform from the root of the graph.

Definition at line 3907 of file nodePath.cxx.

ConstPointerTo< TransformState > NodePath::r_get_partial_transform NodePathComponent comp,
int  n
const [private]
 

Recursively determines the net transform to the indicated component node from the nth node above it.

If n exceeds the length of the path, this returns the net transform from the root of the graph.

Definition at line 3951 of file nodePath.cxx.

void NodePath::r_prepare_scene PandaNode node,
const RenderState state,
GraphicsStateGuardianBase gsg,
bool  do_retained_mode
[private]
 

The recursive implementation of prepare_scene.

Definition at line 4237 of file nodePath.cxx.

void NodePath::remove_node  ) 
 

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 reparent_to() and put it under a holding node instead.

After the node is removed, the NodePath will have been cleared.

Definition at line 494 of file nodePath.cxx.

Referenced by PGEntry::set_num_lines(), and wrt_reparent_to().

NodePath NodePath::removed  )  [inline, static]
 

Creates a NodePath with the ET_removed error type set.

Definition at line 194 of file nodePath.I.

References _max_search_depth.

Referenced by instance_under_node().

void NodePath::reparent_to const NodePath &  other,
int  sort = 0
 

Removes the referenced node of the NodePath from its current parent and attaches it to the referenced node of the indicated NodePath.

Definition at line 284 of file nodePath.cxx.

References _head, PandaNode::attach(), fail(), is_empty(), nassertr, nassertr_always, uncollapse_head(), and verify_complete().

Referenced by find_all_paths_to(), and NodePathCollection::operator[]().

void NodePath::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.

Definition at line 3050 of file nodePath.cxx.

References FindApproxPath::add_string(), find_matches(), is_empty(), and path.

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 1173 of file nodePath.I.

void NodePath::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.

Definition at line 3075 of file nodePath.cxx.

References _max_search_depth, FindApproxLevelEntry::_node_path, FindApproxLevel::add_entry(), is_empty(), WorkingNodePath::is_valid(), nassertv, r_find_matches(), and WorkingNodePath.

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 1192 of file nodePath.I.

Referenced by get_sb().

void NodePath::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.

Definition at line 3098 of file nodePath.cxx.

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 1209 of file nodePath.I.

Referenced by get_sa().

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 1843 of file nodePath.cxx.

References is_empty(), FogAttrib::make_off(), nassertv_always, node(), and PandaNode::set_attrib().

void NodePath::set_color const Colorf color,
int  priority = 0
 

Applies a scene-graph color to the referenced node.

This color will apply to all geometry at this level and below (that does not specify a new color or a set_color_off()).

Definition at line 1703 of file nodePath.cxx.

References TextureCollection::add_texture(), PointerToArray< PointerTo< Texture > >::begin(), PointerToArray< PointerTo< Texture > >::end(), Namable::get_name(), get_net_state(), GlobPattern::matches(), node(), and r_find_all_textures().

void NodePath::set_color float  r,
float  g,
float  b,
float  a = 1.0,
int  priority = 0
 

Applies a scene-graph color to the referenced node.

This color will apply to all geometry at this level and below (that does not specify a new color or a set_color_off()).

Definition at line 1683 of file nodePath.cxx.

References TextureCollection::add_texture(), PointerToArray< PointerTo< Texture > >::begin(), PointerToArray< PointerTo< Texture > >::end(), get_net_state(), node(), and r_find_all_textures().

Referenced by get_quat().

void NodePath::set_color_off int  priority = 0  ) 
 

Sets the geometry at this level and below to render using the geometry color.

This is normally the default, but it may be useful to use this to contradict set_color() at a higher node level (or, with a priority, to override a set_color() at a lower level).

Definition at line 1727 of file nodePath.cxx.

References MaterialPool::get_material(), is_empty(), MaterialAttrib::make(), nassertv, nassertv_always, node(), NULL, PT, and PandaNode::set_attrib().

void NodePath::set_color_scale float  sx,
float  sy,
float  sz,
float  sa
[inline]
 

Sets the color scale component of the transform.

Definition at line 795 of file nodePath.I.

void NodePath::set_color_scale const LVecBase4f &  scale  ) 
 

Sets the color scale component of the transform, leaving translation and rotation untouched.

Definition at line 1067 of file nodePath.cxx.

Referenced by event_fkey(), get_r(), and get_z().

void NodePath::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.

Definition at line 3151 of file nodePath.cxx.

void NodePath::set_depth_test bool  depth_test,
int  priority = 0
 

Specifically sets or disables the testing of the depth buffer on this particular node.

This is normally on in the 3-d scene graph and off in the 2-d scene graph; it should be on for rendering most 3-d objects properly.

Definition at line 2750 of file nodePath.cxx.

References is_empty(), nassertv_always, node(), and r_force_recompute_bounds().

void NodePath::set_depth_write bool  depth_write,
int  priority = 0
 

Specifically sets or disables the writing to the depth buffer on this particular node.

This is normally on in the 3-d scene graph and off in the 2-d scene graph; it should be on for rendering most 3-d objects properly.

Definition at line 2845 of file nodePath.cxx.

References SceneGraphReducer::apply_attribs(), SceneGraphReducer::flatten(), is_empty(), nassertr_always, and node().

void NodePath::set_fog Fog fog,
int  priority = 0
 

Sets the geometry at this level and below to render using the indicated fog.

Definition at line 2315 of file nodePath.cxx.

void NodePath::set_fog_off int  priority = 0  ) 
 

Sets the geometry at this level and below to render using no fog.

This is normally the default, but it may be useful to use this to contradict set_fog() at a higher node level (or, with a priority, to override a set_fog() at a lower level).

Definition at line 2339 of file nodePath.cxx.

References get_mat(), get_parent(), is_empty(), nassertv_always, and set_quat().

void NodePath::set_h const NodePath &  other,
float  h
 

Definition at line 1255 of file nodePath.cxx.

void NodePath::set_h float  h  ) 
 

Definition at line 774 of file nodePath.cxx.

References TransformState::make_pos_hpr_scale().

void NodePath::set_hpr const NodePath &  other,
const LVecBase3f &  hpr
 

Sets the rotation component of the transform, relative to the other node.

Definition at line 1227 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), TransformState::make_pos_hpr_scale(), nassertv_always, and set_transform().

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 993 of file nodePath.I.

void NodePath::set_hpr const LVecBase3f &  hpr  ) 
 

Sets the rotation component of the transform, leaving translation and scale untouched.

Definition at line 766 of file nodePath.cxx.

References is_empty(), and nassertv_always.

void NodePath::set_hpr float  h,
float  p,
float  r
[inline]
 

Sets the rotation component of the transform, leaving translation and scale untouched.

Definition at line 634 of file nodePath.I.

References INLINE.

Referenced by attach_new_node().

void NodePath::set_hpr_scale const NodePath &  other,
const LVecBase3f &  hpr,
const LVecBase3f &  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 1503 of file nodePath.cxx.

References CullBinAttrib::get_class_type(), PandaNode::has_attrib(), is_empty(), nassertr_always, and node().

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 1084 of file nodePath.I.

void NodePath::set_hpr_scale const LVecBase3f &  hpr,
const LVecBase3f &  scale
 

Sets the rotation and scale components of the transform, leaving translation untouched.

Definition at line 956 of file nodePath.cxx.

References y.

void NodePath::set_hpr_scale 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.

Definition at line 714 of file nodePath.I.

References heads_up(), INLINE, x, and y.

Referenced by set_sg().

void NodePath::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.

Definition at line 1593 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), TextureAttrib::get_class_type(), is_empty(), nassertr_always, node(), and NULL.

void NodePath::set_mat const LMatrix4f &  mat  ) 
 

Directly sets an arbitrary 4x4 transform matrix.

Definition at line 1009 of file nodePath.cxx.

void NodePath::set_material Material tex,
int  priority = 0
 

Sets the geometry at this level and below to render using the indicated material.

This operation copies the given material pointer. If the material structure is changed later, it must be reapplied via another call to set_material().

Definition at line 2185 of file nodePath.cxx.

References DCAST, PandaNode::get_attrib(), DepthTestAttrib::get_class_type(), DepthTestAttrib::get_mode(), is_empty(), RenderAttrib::M_none, nassertr_always, node(), and NULL.

void NodePath::set_material_off int  priority = 0  ) 
 

Sets the geometry at this level and below to render using no material.

This is normally the default, but it may be useful to use this to contradict set_material() at a higher node level (or, with a priority, to override a set_material() at a lower level).

Definition at line 2219 of file nodePath.cxx.

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 262 of file nodePath.I.

void NodePath::set_p const NodePath &  other,
float  p
 

Definition at line 1263 of file nodePath.cxx.

References is_empty(), and nassertv_always.

void NodePath::set_p float  p  ) 
 

Definition at line 784 of file nodePath.cxx.

References is_empty(), TransformState::make_pos_hpr_scale(), nassertv_always, and set_transform().

void NodePath::set_pos const NodePath &  other,
const LVecBase3f &  pos
 

Sets the translation component of the transform, relative to the other node.

Definition at line 1153 of file nodePath.cxx.

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 963 of file nodePath.I.

References is_empty(), nassertv_always, node(), and PandaNode::set_draw_mask().

void NodePath::set_pos const LVecBase3f &  pos  ) 
 

Sets the translation component of the transform, leaving rotation and scale untouched.

Definition at line 712 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), nassertv_always, and set_transform().

void NodePath::set_pos float  x,
float  y,
float  z
[inline]
 

Sets the translation component of the transform, leaving rotation and scale untouched.

Definition at line 604 of file nodePath.I.

Referenced by get_material(), get_scale(), output(), and set_pos_hpr_scale().

void NodePath::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.

Definition at line 1459 of file nodePath.cxx.

References is_empty(), CullBinAttrib::make(), nassertv_always, node(), and PandaNode::set_attrib().

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 1063 of file nodePath.I.

void NodePath::set_pos_hpr const LVecBase3f &  pos,
const LVecBase3f &  hpr
 

Sets the translation and rotation component of the transform, leaving scale untouched.

Definition at line 937 of file nodePath.cxx.

void NodePath::set_pos_hpr float  x,
float  y,
float  z,
float  h,
float  p,
float  r
[inline]
 

Sets the translation and rotation component of the transform, leaving scale untouched.

Definition at line 699 of file nodePath.I.

References INLINE, look_at(), x, and y.

Referenced by set_sr().

void NodePath::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.

Definition at line 1528 of file nodePath.cxx.

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 1102 of file nodePath.I.

References INLINE, and uncollapse_head().

void NodePath::set_pos_hpr_scale const LVecBase3f &  pos,
const LVecBase3f &  hpr,
const LVecBase3f &  scale
 

Completely replaces the transform with new translation, rotation, and scale components.

Definition at line 975 of file nodePath.cxx.

References TransformState::get_pos(), get_transform(), is_empty(), and nassertr_always.

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]
 

Completely replaces the transform with new translation, rotation, and scale components.

Definition at line 729 of file nodePath.I.

References INLINE, set_pos(), x, and y.

Referenced by set_sb(), and set_z().

void NodePath::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.

Definition at line 1549 of file nodePath.cxx.

void NodePath::set_pos_quat_scale const LVecBase3f &  pos,
const LQuaternionf &  quat,
const LVecBase3f &  scale
 

Completely replaces the transform with new translation, rotation, and scale components.

Definition at line 993 of file nodePath.cxx.

void NodePath::set_quat const NodePath &  other,
const LQuaternionf &  quat
 

Sets the rotation component of the transform, relative to the other node.

Definition at line 1327 of file nodePath.cxx.

References get_mat(), get_parent(), get_pos(), is_empty(), nassertv_always, and set_quat().

void NodePath::set_quat const LQuaternionf &  quat  ) 
 

Sets the rotation component of the transform, leaving translation and scale untouched.

Definition at line 846 of file nodePath.cxx.

Referenced by set_fog_off(), set_quat(), and set_sz().

void NodePath::set_r const NodePath &  other,
float  r
 

Definition at line 1271 of file nodePath.cxx.

void NodePath::set_r float  r  ) 
 

Definition at line 794 of file nodePath.cxx.

References is_empty(), TransformState::make_pos_quat_scale(), nassertv_always, and set_transform().

void NodePath::set_render_mode_filled int  priority = 0  ) 
 

Sets up the geometry at this level and below (unless overridden) to render in filled (i.e.

not wireframe) mode.

Definition at line 2488 of file nodePath.cxx.

References is_empty(), TransparencyAttrib::M_alpha, TransparencyAttrib::M_none, TransparencyAttrib::make(), TransparencyAttrib::Mode, nassertv_always, node(), and PandaNode::set_attrib().

void NodePath::set_render_mode_wireframe int  priority = 0  ) 
 

Sets up the geometry at this level and below (unless overridden) to render in wireframe mode.

Definition at line 2470 of file nodePath.cxx.

References CompassEffect::get_class_type(), PandaNode::has_effect(), is_empty(), nassertr_always, and node().

void NodePath::set_sa float  sa  )  [inline]
 

Sets the alpha scale component of the transform.

Definition at line 856 of file nodePath.I.

References INLINE, look_at(), x, and y.

void NodePath::set_sb float  sb  )  [inline]
 

Sets the blue scale component of the transform.

Definition at line 840 of file nodePath.I.

References INLINE, set_pos_hpr_scale(), x, and y.

void NodePath::set_scale const NodePath &  other,
const LVecBase3f &  scale
 

Sets the scale component of the transform, relative to the other node.

Definition at line 1381 of file nodePath.cxx.

References is_empty(), ColorAttrib::make_flat(), nassertv_always, node(), and PandaNode::set_attrib().

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 1023 of file nodePath.I.

void NodePath::set_scale const LVecBase3f &  scale  ) 
 

Sets the scale component of the transform, leaving translation and rotation untouched.

Definition at line 878 of file nodePath.cxx.

void NodePath::set_scale float  sx,
float  sy,
float  sz
[inline]
 

Definition at line 669 of file nodePath.I.

References INLINE.

void NodePath::set_scale float  scale  )  [inline]
 

Sets the scale component of the transform, leaving translation and rotation untouched.

Definition at line 664 of file nodePath.I.

References get_color_scale().

Referenced by get_mat().

void NodePath::set_sg float  sg  )  [inline]
 

Sets the alpha scale component of the transform.

Definition at line 824 of file nodePath.I.

References INLINE, and set_hpr_scale().

void NodePath::set_sr float  sr  )  [inline]
 

Sets the red scale component of the transform.

Definition at line 808 of file nodePath.I.

References INLINE, set_pos_hpr(), x, and y.

void NodePath::set_state const NodePath &  other,
const RenderState state
const
 

Sets the state object on this node, relative to the other node.

This computes a new state object that has the indicated value when seen relative to the other node.

Definition at line 626 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), nassertv, nassertv_always, and set_transform().

void NodePath::set_state const RenderState state  )  const [inline]
 

Changes the complete state object on this node.

Definition at line 532 of file nodePath.I.

void NodePath::set_sx const NodePath &  other,
float  sx
 

Definition at line 1408 of file nodePath.cxx.

References is_empty(), and nassertv_always.

void NodePath::set_sx float  sx  ) 
 

Definition at line 885 of file nodePath.cxx.

References get_pos(), is_empty(), and nassertv_always.

void NodePath::set_sy const NodePath &  other,
float  sy
 

Definition at line 1416 of file nodePath.cxx.

void NodePath::set_sy float  sy  ) 
 

Definition at line 894 of file nodePath.cxx.

void NodePath::set_sz const NodePath &  other,
float  sz
 

Definition at line 1424 of file nodePath.cxx.

References ColorAttrib::get_class_type(), PandaNode::has_attrib(), is_empty(), nassertr_always, and node().

void NodePath::set_sz float  sz  ) 
 

Definition at line 903 of file nodePath.cxx.

References get_pos(), is_empty(), nassertv_always, and set_quat().

void NodePath::set_texture Texture tex,
int  priority = 0
 

Sets the geometry at this level and below to render using the indicated texture.

Definition at line 1945 of file nodePath.cxx.

void NodePath::set_texture_off int  priority = 0  ) 
 

Sets the geometry at this level and below to render using no texture.

This is normally the default, but it may be useful to use this to contradict set_texture() at a higher node level (or, with a priority, to override a set_texture() at a lower level).

Definition at line 1969 of file nodePath.cxx.

References PandaNode::clear_attrib(), RenderModeAttrib::get_class_type(), is_empty(), nassertv_always, and node().

void NodePath::set_transform const NodePath &  other,
const TransformState transform
const
 

Sets the 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 685 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), and nassertr_always.

void NodePath::set_transform const TransformState transform  )  const [inline]
 

Changes the complete transform object on this node.

Definition at line 574 of file nodePath.I.

References PandaNode::get_transform(), INLINE, is_empty(), TransformState::is_identity(), nassertr_always, and node().

Referenced by detach_node(), find_all_paths_to(), get_hpr(), get_pos(), get_scale(), output(), set_hpr(), set_p(), set_pos(), set_r(), set_state(), and set_z().

void NodePath::set_transparency bool  transparency,
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 3201 of file nodePath.cxx.

References RenderState::compose(), CPT, DCAST, DCAST_INTO_R, PandaNode::get_children(), TextureAttrib::get_class_type(), GeomNode::get_geom_state(), Namable::get_name(), GeomNode::get_num_geoms(), TextureAttrib::get_texture(), PandaNode::is_geom_node(), GlobPattern::matches(), and NULL.

Referenced by event_fkey().

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 2550 of file nodePath.cxx.

void NodePath::set_x const NodePath &  other,
float  x
 

Definition at line 1177 of file nodePath.cxx.

References CPT, get_transform(), is_empty(), and nassertr_always.

void NodePath::set_x float  x  ) 
 

Definition at line 718 of file nodePath.cxx.

void NodePath::set_y const NodePath &  other,
float  y
 

Definition at line 1185 of file nodePath.cxx.

void NodePath::set_y float  y  ) 
 

Definition at line 726 of file nodePath.cxx.

void NodePath::set_z const NodePath &  other,
float  z
 

Definition at line 1193 of file nodePath.cxx.

References CPT, TransformState::get_hpr(), TransformState::get_pos(), get_transform(), TransformState::has_components(), is_empty(), TransformState::make_pos_hpr_scale(), nassertv_always, set_pos_hpr_scale(), and set_transform().

void NodePath::set_z float  z  ) 
 

Definition at line 734 of file nodePath.cxx.

void NodePath::show DrawMask  camera_mask  )  [inline]
 

Makes the referenced node visible just to the cameras whose camera_mask shares the indicated bits.

That is, this sets the indicated bits in the node's draw mask.

Definition at line 1272 of file nodePath.I.

void NodePath::show  )  [inline]
 

Undoes the effect of a previous hide() on this node: makes the referenced node (and the entire subgraph below this node) visible to all cameras.

Definition at line 1252 of file nodePath.I.

Referenced by PandaFramework::set_texture().

void NodePath::show_bounds  ) 
 

Causes the bounding volume of the bottom node and all of its descendants (that is, the bounding volume associated with the the bottom arc) to be rendered, if possible.

The rendering method is less than optimal; this is intended primarily for debugging.

Definition at line 3484 of file nodePath.cxx.

Referenced by PandaFramework::set_two_sided().

bool NodePath::stash  )  [inline]
 

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).

Returns true if the node is successfully stashed, or false if it was already stashed.

Definition at line 1396 of file nodePath.I.

void NodePath::uncollapse_head  )  const [private]
 

Quietly and transparently uncollapses the _head pointer if it needs it.

This can happen only when two distinct NodePaths are collapsed into the same path after the removal of an instance somewhere higher up the chain.

Definition at line 3816 of file nodePath.cxx.

Referenced by copy_to(), do_billboard_axis(), fail(), find_all_matches(), instance_to(), instance_under_node(), NodePath(), reparent_to(), and set_pos_hpr_scale().

bool NodePath::unstash  )  [inline]
 

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.

Returns true if the node is unstashed, or false if it wasn't stashed to begin with.

Definition at line 1353 of file nodePath.I.

bool NodePath::verify_complete  )  const
 

Returns true if all of the nodes described in the NodePath are connected and the top node is the top of the graph, or false otherwise.

Definition at line 3376 of file nodePath.cxx.

Referenced by find_all_matches(), find_all_paths_to(), instance_to(), node(), and reparent_to().

bool NodePath::write_bam_file const string &  filename  )  const
 

Writes the contents of this node and below out to a bam file with the indicated filename.

This file may then be read in again, as is, at some later point. Returns true if successful, false on some kind of error.

Definition at line 3783 of file nodePath.cxx.

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 3574 of file nodePath.cxx.

void NodePath::wrt_reparent_to const NodePath &  other,
int  sort = 0
 

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 312 of file nodePath.cxx.

References attach_new_node(), instance_to(), is_empty(), and remove_node().


Friends And Related Function Documentation

friend class NodePathCollection [friend]
 

Definition at line 591 of file nodePath.h.

friend class WorkingNodePath [friend]
 

Definition at line 592 of file nodePath.h.

Referenced by set_billboard_point_eye().


Member Data Documentation

ErrorType NodePath::_error_type [private]
 

Definition at line 577 of file nodePath.h.

Referenced by copy_to(), detach_node(), instance_under_node(), NodePath(), and operator=().

PointerTo< NodePathComponent > NodePath::_head [private]
 

Definition at line 576 of file nodePath.h.

Referenced by clear_two_sided(), do_billboard_axis(), fail(), find_all_matches(), get_error_type(), get_max_search_depth(), get_top_node(), instance_to(), is_empty(), is_singleton(), look_at(), NodePath(), reparent_to(), and WorkingNodePath::~WorkingNodePath().

int NodePath::_max_search_depth = 7000 [static, private]
 

Definition at line 58 of file nodePath.cxx.

Referenced by removed(), and set_billboard_point_eye().

TypeHandle NodePath::_type_handle [static, private]
 

Definition at line 59 of file nodePath.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:52:36 2003 for Panda by doxygen1.3