FreeMat
|
Section: Visualization Toolkit Graphics Classes
vtkAssignAttribute is use to label a field (vtkDataArray) as an attribute. A field name or an attribute to labeled can be specified. For example:
aa->Assign("foo", vtkDataSetAttributes::SCALARS, vtkAssignAttribute::POINT_DATA);
tells vtkAssignAttribute to make the array in the point data called "foo" the active scalars. On the other hand,
aa->Assign(vtkDataSetAttributes::VECTORS, vtkDataSetAttributes::SCALARS, vtkAssignAttribute::POINT_DATA);
tells vtkAssignAttribute to make the active vectors also the active scalars. The same can be done more easily from Tcl by using the Assign() method which takes strings:
aa Assign "foo" SCALARS POINT_DATA or aa Assign SCALARS VECTORS POINT_DATA AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS Attribute locations: POINT_DATA, CELL_DATA
To create an instance of class vtkAssignAttribute, simply invoke its constructor as follows
obj = vtkAssignAttribute
The class vtkAssignAttribute has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj
is an instance of the vtkAssignAttribute class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkAssignAttribute = obj.NewInstance ()
vtkAssignAttribute = obj.SafeDownCast (vtkObject o)
obj.Assign (int inputAttributeType, int attributeType, int attributeLoc)
- Label an attribute as another attribute. obj.Assign (string fieldName, int attributeType, int attributeLoc)
- Label an array as an attribute. obj.Assign (string name, string attributeType, string attributeLoc)
- Helper method used by other language bindings. Allows the caller to specify arguments as strings instead of enums.