Panda3D
Loading...
Searching...
No Matches
character.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "character.h"
#include "characterJoint.h"
#include "config_char.h"
#include "nodePath.h"
#include "geomNode.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "pStatTimer.h"
#include "animControl.h"
#include "clockObject.h"
#include "camera.h"
#include "cullTraverser.h"
#include "cullTraverserData.h"

Go to the source code of this file.

Functions

 CPT (SliderTable) Character
 Creates a new SliderTable, similar to the indicated one, with the joint and slider pointers redirected into this object.
 
 CPT (TransformBlendTable) Character
 Creates a new TransformBlendTable, similar to the indicated one, with the joint and slider pointers redirected into this object.
 
 CPT (TransformState) Character
 This is used to support NodePath::calc_tight_bounds().
 
 CPT (TransformTable) Character
 Creates a new TransformTable, similar to the indicated one, with the joint and slider pointers redirected into this object.
 
 PT (CharacterVertexSlider) Character
 Creates a new CharacterVertexSlider that is similar to the indicated one, but points into this character.
 
 PT (Geom) Character
 Makes a new copy of the Geom with the dynamic vertex arrays replaced to reference this Character instead of the other one.
 
 PT (JointVertexTransform) Character
 Creates a new JointVertexTransform that is similar to the indicated one, but points into this character.
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2002-03-06

Definition in file character.cxx.

Function Documentation

◆ CPT() [1/4]

CPT ( SliderTable )

Creates a new SliderTable, similar to the indicated one, with the joint and slider pointers redirected into this object.

Definition at line 985 of file character.cxx.

◆ CPT() [2/4]

Creates a new TransformBlendTable, similar to the indicated one, with the joint and slider pointers redirected into this object.

Definition at line 954 of file character.cxx.

References TransformBlend::get_num_transforms, TransformBlend::get_transform, and TransformBlend::set_transform.

◆ CPT() [3/4]

CPT ( TransformState )
inline

This is used to support NodePath::calc_tight_bounds().

Returns the inverse of this transform.

Makes a new 2-d TransformState with the specified components.

Makes a new TransformState with the specified components.

Returns the transform that has been set as this node's "previous" position.

Returns the net "previous" transform on this node from the root.

Returns the relative transform to convert from the LODNode space to the camera space.

It is not intended to be called directly, and it has nothing to do with the normal Panda bounding-volume computation.

If the node contains any geometry, this updates min_point and max_point to enclose its bounding box. found_any is to be set true if the node has any geometry at all, or left alone if it has none. This method may be called over several nodes, so it may enter with min_point, max_point, and found_any already set.

This function is recursive, and the return value is the transform after it has been modified by this node's transform.

Merges old_bundle with new_bundle. old_bundle must be one of the PartBundles within this node. At the end of this call, the old_bundle pointer within this node will be replaced with the new_bundle pointer, and all geometry within this node will be updated to reference new_bundle.

See set_prev_transform().

Sets the translation component of the transform, leaving rotation and scale untouched. This also resets the node's "previous" position, so that the collision system will see the node as having suddenly appeared in the new position, without passing any points in between.

See set_prev_transform().

Returns true if this node has the _dirty_prev_transform flag set, which indicates its _prev_transform is different from its _transform value (in pipeline stage 0). In this case, the node will be visited by reset_prev_transform().

Retrieves the user-defined value that was previously set on this node for the particular key, if any. If no value has been previously set, returns the empty string.

Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.

Returns the number of tags applied to this node.

Returns the key of the nth tag applied to this node.

Returns true if the node has any tags (or any Python tags) at all, false if it has none.

Lists all the nodes at and below the current path hierarchically.

Returns the special bit that, when specifically cleared in the node's DrawMask, indicates that the node is hidden to all cameras, regardless of the remaining DrawMask bits.

If you are going to immediately compose this result with another TransformState, it is faster to do it in one operation with invert_compose().

Returns the pointer to the unique TransformState in the cache that is equivalent to this one. This may be the same pointer as this object, or it may be a different pointer; but it will be an equivalent object, and it will be a shared pointer. This may be called from time to time to improve cache benefits.

Returns the union of the Geom::GeomRendering bits that will be required once this TransformState is applied to a geom which includes the indicated geom_rendering bits. The RenderState's get_geom_rendering() should already have been applied.

Overrides this method to update PStats appropriately.

Overrides this method to update PStats appropriately.

Overrides this method to update PStats appropriately.

Overrides this method to update PStats appropriately.

Returns the number of entries in the composition cache for this TransformState. This is the number of other TransformStates whose composition with this one has been cached. This number is not useful for any practical reason other than performance analysis.

Returns the number of entries in the invert_composition cache for this TransformState. This is similar to the composition cache, but it records cache entries for the invert_compose() operation. See get_composition_cache_num_entries().

Returns the number of slots in the composition cache for this TransformState. You may use this as an upper bound when walking through all of the composition cache results via get_composition_cache_source() or result().

This has no practical value other than for examining the cache for performance analysis.

Returns the source TransformState of the nth element in the composition cache. Returns NULL if there doesn't happen to be an entry in the nth element. See get_composition_cache_result().

This has no practical value other than for examining the cache for performance analysis.

Returns the result TransformState of the nth element in the composition cache. Returns NULL if there doesn't happen to be an entry in the nth element.

In general, a->compose(a->get_composition_cache_source(n)) == a->get_composition_cache_result(n).

This has no practical value other than for examining the cache for performance analysis.

Returns the number of slots in the composition cache for this TransformState. You may use this as an upper bound when walking through all of the composition cache results via get_invert_composition_cache_source() or result().

This has no practical value other than for examining the cache for performance analysis.

Returns the source TransformState of the nth element in the invert composition cache. Returns NULL if there doesn't happen to be an entry in the nth element. See get_invert_composition_cache_result().

This has no practical value other than for examining the cache for performance analysis.

Returns the result TransformState of the nth element in the invert composition cache. Returns NULL if there doesn't happen to be an entry in the nth element.

In general, a->invert_compose(a->get_invert_composition_cache_source(n)) == a->get_invert_composition_cache_result(n).

This has no practical value other than for examining the cache for performance analysis.

Flushes the PStatCollectors used during traversal.

Definition at line 218 of file character.cxx.

References PandaNode::calc_tight_bounds(), PandaNode::get_bounds(), PandaNode::get_parent, and PandaNode::get_parents.

◆ CPT() [4/4]

CPT ( TransformTable )

Creates a new TransformTable, similar to the indicated one, with the joint and slider pointers redirected into this object.

Definition at line 928 of file character.cxx.

◆ PT() [1/3]

Creates a new CharacterVertexSlider that is similar to the indicated one, but points into this character.

If one was already created (in the GeomSliderMap), returns it instead.

Definition at line 1047 of file character.cxx.

References Character::find_slider(), CharacterVertexSlider::get_char_slider(), and TypedObject::is_of_type().

◆ PT() [2/3]

PT ( Geom )

Makes a new copy of the Geom with the dynamic vertex arrays replaced to reference this Character instead of the other one.

If no arrays have changed, simply returns the same Geom.

Definition at line 821 of file character.cxx.

References Geom::make_copy().

◆ PT() [3/3]

Creates a new JointVertexTransform that is similar to the indicated one, but points into this character.

If one was already created (in the GeomJointMap), returns it instead.

Definition at line 1011 of file character.cxx.

References JointVertexTransform::get_joint(), and TypedObject::is_of_type().