Panda3D
|
This defines a single entry in a TransformBlendTable. More...
Public Member Functions | |
__init__ () | |
__init__ (const TransformBlend copy) | |
__init__ (const VertexTransform transform0, float weight0) | |
__init__ (const VertexTransform transform0, float weight0, const VertexTransform transform1, float weight1) | |
__init__ (const VertexTransform transform0, float weight0, const VertexTransform transform1, float weight1, const VertexTransform transform2, float weight2) | |
__init__ (const VertexTransform transform0, float weight0, const VertexTransform transform1, float weight1, const VertexTransform transform2, float weight2, const VertexTransform transform3, float weight3) | |
addTransform (const VertexTransform transform, float weight) | |
Adds a new transform to the blend. More... | |
int | compareTo (const TransformBlend other) |
Defines an arbitrary ordering for TransformBlend objects. More... | |
getBlend (LMatrix4 result, Thread current_thread) | |
Returns the current value of the blend, based on the current value of all of the nested transform objects and their associated weights. More... | |
UpdateSeq | getModified (Thread current_thread) |
Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes. More... | |
int | getNumTransforms () |
Returns the number of transforms stored in the blend object. More... | |
const VertexTransform | getTransform (int n) |
Returns the nth transform stored in the blend object. More... | |
list | getTransforms () |
float | getWeight (const VertexTransform transform) |
Returns the weight associated with the indicated transform, or 0 if there is no entry for the transform. More... | |
float | getWeight (int n) |
Returns the weight associated with the nth transform stored in the blend object. More... | |
bool | hasTransform (const VertexTransform transform) |
Returns true if the blend has the indicated transform, false otherwise. More... | |
limitTransforms (int max_transforms) | |
If the total number of transforms in the blend exceeds max_transforms, removes the n least-important transforms as needed to reduce the number of transforms to max_transforms. More... | |
normalizeWeights () | |
Rescales all of the weights on the various transforms so that they sum to 1.0. More... | |
bool | operator!= (const TransformBlend other) |
bool | operator< (const TransformBlend other) |
TransformBlend | operator= (const TransformBlend copy) |
bool | operator== (const TransformBlend other) |
output (Ostream out) | |
removeTransform (const VertexTransform transform) | |
Removes the indicated transform from the blend. More... | |
removeTransform (int n) | |
Removes the nth transform stored in the blend object. More... | |
setTransform (int n, const VertexTransform transform) | |
Replaces the nth transform stored in the blend object. More... | |
setWeight (int n, float weight) | |
Replaces the weight associated with the nth transform stored in the blend object. More... | |
transformPoint (LPoint3d point, Thread current_thread) | |
Transforms the indicated point by the blend matrix. More... | |
transformPoint (LPoint3f point, Thread current_thread) | |
transformPoint (LPoint4d point, Thread current_thread) | |
Transforms the indicated point by the blend matrix. More... | |
transformPoint (LPoint4f point, Thread current_thread) | |
transformVector (LVector3d point, Thread current_thread) | |
Transforms the indicated vector by the blend matrix. More... | |
transformVector (LVector3f point, Thread current_thread) | |
updateBlend (Thread current_thread) | |
Recomputes the internal representation of the blend value, if necessary. More... | |
write (Ostream out, int indent_level) | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
Public Attributes | |
UpdateSeq | modified |
Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes. More... | |
const VertexTransform | transforms [] |
Returns the nth transform stored in the blend object. More... | |
float | weights [] |
Returns the weight associated with the nth transform stored in the blend object. More... | |
This defines a single entry in a TransformBlendTable.
It represents a unique combination of VertexTransform pointers and blend amounts.
__init__ | ( | ) |
__init__ | ( | const TransformBlend | copy | ) |
__init__ | ( | const VertexTransform | transform0, |
float | weight0 | ||
) |
__init__ | ( | const VertexTransform | transform0, |
float | weight0, | ||
const VertexTransform | transform1, | ||
float | weight1 | ||
) |
__init__ | ( | const VertexTransform | transform0, |
float | weight0, | ||
const VertexTransform | transform1, | ||
float | weight1, | ||
const VertexTransform | transform2, | ||
float | weight2 | ||
) |
__init__ | ( | const VertexTransform | transform0, |
float | weight0, | ||
const VertexTransform | transform1, | ||
float | weight1, | ||
const VertexTransform | transform2, | ||
float | weight2, | ||
const VertexTransform | transform3, | ||
float | weight3 | ||
) |
addTransform | ( | const VertexTransform | transform, |
float | weight | ||
) |
Adds a new transform to the blend.
If the transform already existed, increases its weight factor.
int compareTo | ( | const TransformBlend | other | ) |
Defines an arbitrary ordering for TransformBlend objects.
Returns the current value of the blend, based on the current value of all of the nested transform objects and their associated weights.
You should call update_blend() to ensure that the cache is up-to-date before calling this.
|
static |
Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes.
int getNumTransforms | ( | ) |
Returns the number of transforms stored in the blend object.
const VertexTransform getTransform | ( | int | n | ) |
Returns the nth transform stored in the blend object.
list getTransforms | ( | ) |
float getWeight | ( | const VertexTransform | transform | ) |
Returns the weight associated with the indicated transform, or 0 if there is no entry for the transform.
float getWeight | ( | int | n | ) |
Returns the weight associated with the nth transform stored in the blend object.
bool hasTransform | ( | const VertexTransform | transform | ) |
Returns true if the blend has the indicated transform, false otherwise.
limitTransforms | ( | int | max_transforms | ) |
If the total number of transforms in the blend exceeds max_transforms, removes the n least-important transforms as needed to reduce the number of transforms to max_transforms.
normalizeWeights | ( | ) |
Rescales all of the weights on the various transforms so that they sum to 1.0.
It is generally a good idea to call this after adding or removing transforms from the blend.
bool operator!= | ( | const TransformBlend | other | ) |
bool operator< | ( | const TransformBlend | other | ) |
TransformBlend operator= | ( | const TransformBlend | copy | ) |
bool operator== | ( | const TransformBlend | other | ) |
output | ( | Ostream | out | ) |
removeTransform | ( | const VertexTransform | transform | ) |
Removes the indicated transform from the blend.
removeTransform | ( | int | n | ) |
Removes the nth transform stored in the blend object.
setTransform | ( | int | n, |
const VertexTransform | transform | ||
) |
Replaces the nth transform stored in the blend object.
setWeight | ( | int | n, |
float | weight | ||
) |
Replaces the weight associated with the nth transform stored in the blend object.
Transforms the indicated point by the blend matrix.
You should call update_blend() to ensure that the cache is up-to-date before calling this.
Transforms the indicated point by the blend matrix.
You should call update_blend() to ensure that the cache is up-to-date before calling this.
Transforms the indicated vector by the blend matrix.
You should call update_blend() to ensure that the cache is up-to-date before calling this.
updateBlend | ( | Thread | current_thread | ) |
Recomputes the internal representation of the blend value, if necessary.
You should call this before calling get_blend() or transform_point().
write | ( | Ostream | out, |
int | indent_level | ||
) |
UpdateSeq modified |
Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes.
const VertexTransform transforms[] |
Returns the nth transform stored in the blend object.
float weights[] |
Returns the weight associated with the nth transform stored in the blend object.
Returns the weight associated with the indicated transform, or 0 if there is no entry for the transform.