Panda3D
|
This defines a single entry in a TransformBlendTable. More...
Public Member Functions | |
TransformBlend () | |
TransformBlend (TransformBlend const copy) | |
TransformBlend (VertexTransform const transform0, float weight0, VertexTransform const transform1, float weight1) | |
TransformBlend (VertexTransform const transform0, float weight0, VertexTransform const transform1, float weight1, VertexTransform const transform2, float weight2) | |
TransformBlend (VertexTransform const transform0, float weight0) | |
TransformBlend (VertexTransform const transform0, float weight0, VertexTransform const transform1, float weight1, VertexTransform const transform2, float weight2, VertexTransform const transform3, float weight3) | |
addTransform (VertexTransform const transform, float weight) | |
Adds a new transform to the blend. | |
int | compareTo (TransformBlend const other) |
Defines an arbitrary ordering for TransformBlend objects. | |
getBlend (Mat4 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. | |
UpdateSeq | getModified (Thread current_thread) |
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. | |
VertexTransform const | getTransform (int n) |
Returns the nth transform stored in the blend object. | |
list | getTransforms () |
float | getWeight (VertexTransform const 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 (VertexTransform const transform) |
Returns true if the blend has the indicated transform, false otherwise. | |
normalizeWeights () | |
Rescales all of the weights on the various transforms so that they sum to 1.0. | |
bool | operator!= (TransformBlend const other) |
bool | operator< (TransformBlend const other) |
TransformBlend | operator= (TransformBlend const copy) |
bool | operator== (TransformBlend const other) |
output (ostream out) | |
removeTransform (VertexTransform const transform) | |
Removes the indicated transform to the blend. | |
setTransform (int n, VertexTransform const 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. | |
transformPoint (Point3 point, Thread current_thread) | |
Transforms the indicated point by the blend matrix. | |
transformPoint (Point4 point, Thread current_thread) | |
Transforms the indicated point by the blend matrix. | |
transformVector (Vec3 point, Thread current_thread) | |
Transforms the indicated vector by the blend matrix. | |
updateBlend (Thread current_thread) | |
Recomputes the internal representation of the blend value, if necessary. | |
write (ostream out, int indent_level) | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
This defines a single entry in a TransformBlendTable.
It represents a unique combination of VertexTransform pointers and blend amounts.
TransformBlend | ( | ) |
TransformBlend | ( | TransformBlend const | copy | ) |
TransformBlend | ( | VertexTransform const | transform0, |
float | weight0 | ||
) |
TransformBlend | ( | VertexTransform const | transform0, |
float | weight0, | ||
VertexTransform const | transform1, | ||
float | weight1 | ||
) |
TransformBlend | ( | VertexTransform const | transform0, |
float | weight0, | ||
VertexTransform const | transform1, | ||
float | weight1, | ||
VertexTransform const | transform2, | ||
float | weight2 | ||
) |
TransformBlend | ( | VertexTransform const | transform0, |
float | weight0, | ||
VertexTransform const | transform1, | ||
float | weight1, | ||
VertexTransform const | transform2, | ||
float | weight2, | ||
VertexTransform const | transform3, | ||
float | weight3 | ||
) |
addTransform | ( | VertexTransform const | transform, |
float | weight | ||
) |
Adds a new transform to the blend.
If the transform already existed, increases its weight factor.
int compareTo | ( | TransformBlend const | 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 TypeHandle getClassType | ( | ) | [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.
VertexTransform const getTransform | ( | int | n | ) |
Returns the nth transform stored in the blend object.
list getTransforms | ( | ) |
float getWeight | ( | VertexTransform const | 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 | ( | VertexTransform const | transform | ) |
Returns true if the blend has the indicated transform, false otherwise.
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!= | ( | TransformBlend const | other | ) |
bool operator< | ( | TransformBlend const | other | ) |
TransformBlend operator= | ( | TransformBlend const | copy | ) |
bool operator== | ( | TransformBlend const | other | ) |
output | ( | ostream | out | ) |
removeTransform | ( | VertexTransform const | transform | ) |
Removes the indicated transform to the blend.
setTransform | ( | int | n, |
VertexTransform const | 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().