VTK
|
transform based on per-point or per-cell weighting functions. More...
#include <vtkWeightedTransformFilter.h>
Inherits vtkPointSetAlgorithm.
Public Types | |
typedef vtkPointSetAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkWeightedTransformFilter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
unsigned long | GetMTime () |
virtual void | SetWeightArray (const char *) |
virtual char * | GetWeightArray () |
virtual void | SetTransformIndexArray (const char *) |
virtual char * | GetTransformIndexArray () |
virtual void | SetCellDataWeightArray (const char *) |
virtual char * | GetCellDataWeightArray () |
virtual void | SetCellDataTransformIndexArray (const char *) |
virtual char * | GetCellDataTransformIndexArray () |
virtual void | SetTransform (vtkAbstractTransform *transform, int num) |
virtual vtkAbstractTransform * | GetTransform (int num) |
virtual void | SetNumberOfTransforms (int num) |
virtual int | GetNumberOfTransforms () |
virtual void | AddInputValuesOn () |
virtual void | AddInputValuesOff () |
virtual void | SetAddInputValues (int) |
virtual int | GetAddInputValues () |
Static Public Member Functions | |
static vtkWeightedTransformFilter * | New () |
static int | IsTypeOf (const char *type) |
static vtkWeightedTransformFilter * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkWeightedTransformFilter () | |
~vtkWeightedTransformFilter () | |
int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
Protected Attributes | |
vtkAbstractTransform ** | Transforms |
int | NumberOfTransforms |
int | AddInputValues |
char * | CellDataWeightArray |
char * | WeightArray |
char * | CellDataTransformIndexArray |
char * | TransformIndexArray |
transform based on per-point or per-cell weighting functions.
vtkWeightedTransformFilter is a filter that can be used to "skin" structures and to create new and complex shapes. Unlike a traditional transform filter (which has one transform for a data set) or an assembly (which has one transform per part or group of parts), a weighted transform produces the weighted sum of transforms on a per-point or per-cell basis.
Each point or cell in the filter's input has an attached DataArray that contains tuples of weighting functions, one per point or cell. The filter also has a set of fixed transforms. When the filter executes, each input point/cell is transformed by each of the transforms. These results are weighted by the point/cell's weighting factors to produce final output data.
Linear transforms are performance-optimized. Using arbitrary transforms will work, but performance may suffer.
As an example of the utility of weighted transforms, here's how this filter can be used for "skinning." Skinning is the process of putting a mesh cover over an underlying structure, like skin over bone. Joints are difficult to skin because deformation is hard to do. Visualize skin over an elbow joint. Part of the skin moves with one bone, part of the skin moves with the other bone, and the skin in the middle moves a little with each.
Weighted filtering can be used for a simple and efficient kind of skinning. Begin with a cylindrical mesh. Create a FloatArray with two components per tuple, and one tuple for each point in the mesh. Assign transform weights that linear interpolate the distance along the cylinder (one component is the distance along the cylinder, the other is one minus that distance). Set the filter up to use two transforms, the two used to transform the two bones. Now, when the transforms change, the mesh will deform so as to, hopefully, continue to cover the bones.
vtkWeightedTransformFilter is also useful for creating "strange and complex" shapes using pinching, bending, and blending.
Definition at line 81 of file vtkWeightedTransformFilter.h.
typedef vtkPointSetAlgorithm vtkWeightedTransformFilter::Superclass |
Definition at line 85 of file vtkWeightedTransformFilter.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
vtkWeightedTransformFilter* vtkWeightedTransformFilter::NewInstance | ( | ) | const |
void vtkWeightedTransformFilter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
unsigned long vtkWeightedTransformFilter::GetMTime | ( | ) |
Return the MTime also considering the filter's transforms.
|
virtual |
WeightArray is the string name of the DataArray in the input's FieldData that holds the weighting coefficients for each point. The filter will first look for the array in the input's PointData FieldData. If the array isn't there, the filter looks in the input's FieldData. The WeightArray can have tuples of any length, but must have a tuple for every point in the input data set. This array transforms points, normals, and vectors.
|
virtual |
WeightArray is the string name of the DataArray in the input's FieldData that holds the weighting coefficients for each point. The filter will first look for the array in the input's PointData FieldData. If the array isn't there, the filter looks in the input's FieldData. The WeightArray can have tuples of any length, but must have a tuple for every point in the input data set. This array transforms points, normals, and vectors.
|
virtual |
TransformIndexArray is the string name of the DataArray in the input's FieldData that holds the indices for the transforms for each point. These indices are used to select which transforms each weight of the DataArray refers. If the TransformIndexArray is not specified, the weights of each point are assumed to map directly to a transform. This DataArray must be of type UnsignedShort, which effectively limits the number of transforms to 65536 if a transform index array is used. The filter will first look for the array in the input's PointData FieldData. If the array isn't there, the filter looks in the input's FieldData. The TransformIndexArray can have tuples of any length, but must have a tuple for every point in the input data set. This array transforms points, normals, and vectors.
|
virtual |
TransformIndexArray is the string name of the DataArray in the input's FieldData that holds the indices for the transforms for each point. These indices are used to select which transforms each weight of the DataArray refers. If the TransformIndexArray is not specified, the weights of each point are assumed to map directly to a transform. This DataArray must be of type UnsignedShort, which effectively limits the number of transforms to 65536 if a transform index array is used. The filter will first look for the array in the input's PointData FieldData. If the array isn't there, the filter looks in the input's FieldData. The TransformIndexArray can have tuples of any length, but must have a tuple for every point in the input data set. This array transforms points, normals, and vectors.
|
virtual |
The CellDataWeightArray is analogous to the WeightArray, except for CellData. The array is searched for first in the CellData FieldData, then in the input's FieldData. The data array must have a tuple for each cell. This array is used to transform only normals and vectors.
|
virtual |
The CellDataWeightArray is analogous to the WeightArray, except for CellData. The array is searched for first in the CellData FieldData, then in the input's FieldData. The data array must have a tuple for each cell. This array is used to transform only normals and vectors.
|
virtual |
The CellDataTransformIndexArray is like a TransformIndexArray, except for cell data. The array must have type UnsignedShort.
|
virtual |
The CellDataTransformIndexArray is like a TransformIndexArray, except for cell data. The array must have type UnsignedShort.
|
virtual |
Set or Get one of the filter's transforms. The transform number must be less than the number of transforms allocated for the object. Setting a transform slot to NULL is equivalent to assigning an overriding weight of zero to that filter slot.
|
virtual |
Set or Get one of the filter's transforms. The transform number must be less than the number of transforms allocated for the object. Setting a transform slot to NULL is equivalent to assigning an overriding weight of zero to that filter slot.
|
virtual |
Set the number of transforms for the filter. References to non-existent filter numbers in the data array is equivalent to a weight of zero (i.e., no contribution of that filter or weight). The maximum number of transforms is limited to 65536 if transform index arrays are used.
|
virtual |
Set the number of transforms for the filter. References to non-existent filter numbers in the data array is equivalent to a weight of zero (i.e., no contribution of that filter or weight). The maximum number of transforms is limited to 65536 if transform index arrays are used.
|
virtual |
If AddInputValues is true, the output values of this filter will be offset from the input values. The effect is exactly equivalent to having an identity transform of weight 1 added into each output point.
|
virtual |
If AddInputValues is true, the output values of this filter will be offset from the input values. The effect is exactly equivalent to having an identity transform of weight 1 added into each output point.
|
virtual |
If AddInputValues is true, the output values of this filter will be offset from the input values. The effect is exactly equivalent to having an identity transform of weight 1 added into each output point.
|
virtual |
If AddInputValues is true, the output values of this filter will be offset from the input values. The effect is exactly equivalent to having an identity transform of weight 1 added into each output point.
|
protected |
|
protected |
Definition at line 162 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 167 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 168 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 170 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 171 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 173 of file vtkWeightedTransformFilter.h.
|
protected |
Definition at line 174 of file vtkWeightedTransformFilter.h.