Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# TransformBlend Class Reference

This defines a single entry in a TransformBlendTable. More...

List of all members.

## 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.
| 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.
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 from 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 (Point4 point, Thread current_thread)
| Transforms the indicated point by the blend matrix.
| transformPoint (Point4D point, Thread current_thread)
| Transforms the indicated point by the blend matrix.
| transformPoint (Point3 point, Thread current_thread)
| Transforms the indicated point by the blend matrix.
| transformPoint (Point3D point, Thread current_thread)
| Transforms the indicated point by the blend matrix.
| transformVector (Vec3D point, Thread current_thread)
| Transforms the indicated vector 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 ()

## Detailed Description

This defines a single entry in a TransformBlendTable.

It represents a unique combination of VertexTransform pointers and blend amounts.

## Constructor & Destructor Documentation

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

## Member Function Documentation

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.

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.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

static TypeHandle getClassType | ( |  | ) | `[static]`

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.

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!= | ( | 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 from 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.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

transformPoint | ( | Point4 | point,
|  | Thread | current_thread
| ) |  |

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.

transformPoint | ( | Point4D | point,
|  | Thread | current_thread
| ) |  |

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.

transformPoint | ( | Point3D | point,
|  | Thread | current_thread
| ) |  |

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.

transformVector | ( | Vec3 | point,
|  | Thread | current_thread
| ) |  |

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.

transformVector | ( | Vec3D | point,
|  | Thread | current_thread
| ) |  |

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

All Classes Namespaces Functions Variables Enumerations Enumerator Properties