Character
from panda3d.core import Character
- class Character
Bases:
PartBundleNode
An animated character, with skeleton-morph animation and either soft- skinned or hard-skinned vertices.
Inheritance diagram
- __init__(*args, **kwargs)
- clearLodAnimation()
C++ Interface: clear_lod_animation(const Character self)
- /**
Undoes the effect of a recent call to set_lod_animation(). Henceforth, the
character will animate every frame, regardless of its distance from the
camera.
*/
- clear_lod_animation()
C++ Interface: clear_lod_animation(const Character self)
- /**
Undoes the effect of a recent call to set_lod_animation(). Henceforth, the
character will animate every frame, regardless of its distance from the
camera.
*/
- findJoint()
C++ Interface: find_joint(Character self, str name)
- /**
Returns a pointer to the joint with the given name, if there is such a
joint, or NULL if there is no such joint. This will not return a pointer
to a slider.
*/
- findSlider()
C++ Interface: find_slider(Character self, str name)
- /**
Returns a pointer to the slider with the given name, if there is such a
slider, or NULL if there is no such slider. This will not return a pointer
to a joint.
*/
- find_joint()
C++ Interface: find_joint(Character self, str name)
- /**
Returns a pointer to the joint with the given name, if there is such a
joint, or NULL if there is no such joint. This will not return a pointer
to a slider.
*/
- find_slider()
C++ Interface: find_slider(Character self, str name)
- /**
Returns a pointer to the slider with the given name, if there is such a
slider, or NULL if there is no such slider. This will not return a pointer
to a joint.
*/
- forceUpdate()
C++ Interface: force_update(const Character self)
- /**
Recalculates the character even if we think it doesn’t need it.
*/
- force_update()
C++ Interface: force_update(const Character self)
- /**
Recalculates the character even if we think it doesn’t need it.
*/
- getClassType()
C++ Interface: get_class_type()
- get_class_type()
C++ Interface: get_class_type()
- mergeBundles()
C++ Interface: merge_bundles(const Character self, PartBundleHandle old_bundle_handle, PartBundleHandle other_bundle_handle)
- /**
Merges old_bundle_handle->get_bundle() with new_bundle. old_bundle_handle
must be one of the PartBundleHandle within this node. At the end of this
call, the bundle pointer within the old_bundle_handle will be replaced with
that within the new_bundle_handle pointer, and all geometry within this
node will be updated to reference new_bundle.
Normally, this is called when the two bundles have the same, or nearly the
same, hierarchies. In this case, new_bundle will simply be assigned over
the old_bundle position. However, if any joints are present in one bundle
or the other, new_bundle will be modified to contain the union of all
joints.
The geometry below this node is also updated to reference new_bundle,
instead of the original old_bundle.
This method is intended to unify two different models that share a common
skeleton, for instance, different LOD’s of the same model.
*/
- merge_bundles()
C++ Interface: merge_bundles(const Character self, PartBundleHandle old_bundle_handle, PartBundleHandle other_bundle_handle)
- /**
Merges old_bundle_handle->get_bundle() with new_bundle. old_bundle_handle
must be one of the PartBundleHandle within this node. At the end of this
call, the bundle pointer within the old_bundle_handle will be replaced with
that within the new_bundle_handle pointer, and all geometry within this
node will be updated to reference new_bundle.
Normally, this is called when the two bundles have the same, or nearly the
same, hierarchies. In this case, new_bundle will simply be assigned over
the old_bundle position. However, if any joints are present in one bundle
or the other, new_bundle will be modified to contain the union of all
joints.
The geometry below this node is also updated to reference new_bundle,
instead of the original old_bundle.
This method is intended to unify two different models that share a common
skeleton, for instance, different LOD’s of the same model.
*/
- setLodAnimation()
C++ Interface: set_lod_animation(const Character self, const LPoint3f center, float far_distance, float near_distance, float delay_factor)
- /**
Activates a special mode in which the character animates less frequently as
it gets further from the camera. This is intended as a simple optimization
to minimize the effort of computing animation for lots of characters that
may not necessarily be very important to animate every frame.
If the character is closer to the camera than near_distance, then it is
animated its normal rate, every frame. If the character is exactly
far_distance away, it is animated only every delay_factor seconds (which
should be a number greater than 0). If the character is between
near_distance and far_distance, its animation rate is linearly interpolated
according to its distance between the two. The interpolation function
continues beyond far_distance, so that the character is animated
increasingly less frequently as it gets farther away.
The distance calculations are made from center, which is a fixed point
relative to the character node, to the camera’s lod center or cull center
node (or to the camera node itself).
If multiple cameras are viewing the character in any given frame, the
closest one counts.
*/
- set_lod_animation()
C++ Interface: set_lod_animation(const Character self, const LPoint3f center, float far_distance, float near_distance, float delay_factor)
- /**
Activates a special mode in which the character animates less frequently as
it gets further from the camera. This is intended as a simple optimization
to minimize the effort of computing animation for lots of characters that
may not necessarily be very important to animate every frame.
If the character is closer to the camera than near_distance, then it is
animated its normal rate, every frame. If the character is exactly
far_distance away, it is animated only every delay_factor seconds (which
should be a number greater than 0). If the character is between
near_distance and far_distance, its animation rate is linearly interpolated
according to its distance between the two. The interpolation function
continues beyond far_distance, so that the character is animated
increasingly less frequently as it gets farther away.
The distance calculations are made from center, which is a fixed point
relative to the character node, to the camera’s lod center or cull center
node (or to the camera node itself).
If multiple cameras are viewing the character in any given frame, the
closest one counts.
*/
- update()
C++ Interface: update(const Character self)
- /**
Recalculates the Character’s joints and vertices for the current frame.
Normally this is performed automatically during the render and need not be
called explicitly.
*/
- updateToNow()
C++ Interface: update_to_now(const Character self)
- /**
Advances the character’s frame to the current time, and then calls
update(). This can be used by show code to force an update of the
character’s position to the current frame, regardless of whether the
character is currently onscreen and animating.
@deprecated Call update() instead.
*/
- update_to_now()
C++ Interface: update_to_now(const Character self)
- /**
Advances the character’s frame to the current time, and then calls
update(). This can be used by show code to force an update of the
character’s position to the current frame, regardless of whether the
character is currently onscreen and animating.
@deprecated Call update() instead.
*/
- writePartValues()
C++ Interface: write_part_values(Character self, ostream out)
- /**
Writes a list of the Character’s joints and sliders, along with each
current position, in their hierchical structure, to the indicated output
stream.
*/
- writeParts()
C++ Interface: write_parts(Character self, ostream out)
- /**
Writes a list of the Character’s joints and sliders, in their hierchical
structure, to the indicated output stream.
*/