vtkGlyph3D - copy oriented and scaled glyph geometry to every input point
Super Class: vtkDataSetToPolyDataFilter
Description:
vtkGlyph3D is a filter that copies a geometric representation (called a glyph) to every point in the input dataset. The glyph is defined with polygonal data from a source filter input. The glyph may be oriented along the input vectors or normals, and it may be scaled according to scalar data or vector magnitude. More than one glyph may be used by creating a table of source objects, each defining a different glyph. If a table of glyphs is defined, then the table can be indexed into by using either scalar value or vector magnitude. To use this object you'll have to provide an input dataset and a source to define the glyph. Then decide whether you want to scale the glyph and how to scale the glyph (using scalar value or vector magnitude). Next decide whether you want to orient the glyph, and whether to use the vector data or normal data to orient it. Finally, decide whether to use a table of glyphs, or just a single glyph. If you use a table of glyphs, you'll have to decide whether to index into it with scalar value or with vector magnitude.
Caveats:
The scaling of the glyphs is controled by the ScaleFactor ivar multiplied by the scalar value at each point (if VTK_SCALE_BY_SCALAR is set), or multiplied by the vector magnitude (if VTK_SCALE_BY_VECTOR is set). The scale factor can be further controlled by enabling clamping using the Clamping ivar. If clamping is enabled, the scale is normalized by the Range ivar, and then multiplied by the scale factor. The normalization process includes clamping the scale value between (0,1). Typically this object operates on input data with scalar and/or vector data. However, scalar and/or vector aren't necessary, and it can be used to copy data from a single source to each point. In this case the scale factor can be used to uniformly scale the glyphs. The object uses "vector" data to scale glyphs, orient glyphs, and/or index into a table of glyphs. You can choose to use either the vector or normal data at each input point. Use the method SetVectorModeToUseVector() to use the vector input data, and SetVectorModeToUseNormal() to use the normal input data. If you do use a table of glyphs, make sure to set the Range ivar to make sure the index into the glyph table is computed correctly. You can turn off scaling of the glyphs completely by using the Scaling ivar. You can also turn off scaling due to data (either vector or scalar) by using the SetScaleModeToDataScalingOff() method.
See Also:
Methods:
Detailed Method Descriptions:
void Update () |
int GetNumberOfSources () | |
void SetNumberOfSources (int ) |
void SetSource (vtkPolyData *) |
void SetSource (int ,vtkPolyData *) |
vtkPolyData *GetSource (int ) |
void SetScaling (int ) | |
void ScalingOn () | |
void ScalingOff () | |
int GetScaling () |
void SetScaleMode (int ) | |
int GetScaleMode () | |
void SetScaleModeToScaleByScalar () | |
void SetScaleModeToScaleByVector () | |
void SetScaleModeToDataScalingOff () | |
char *GetScaleModeAsString () |
void SetColorMode (int ) | |
int GetColorMode () | |
void SetColorModeToColorByScale () | |
void SetColorModeToColorByScalar () | |
void SetColorModeToColorByVector () | |
char *GetColorModeAsString () |
void SetScaleFactor (float ) | |
float GetScaleFactor () |
void SetRange (float ,float ) | |
void SetRange (float *) | |
float *GetRange () |
void SetOrient (int ) | |
void OrientOn () | |
void OrientOff () | |
int GetOrient () |
void SetClamping (int ) | |
void ClampingOn () | |
void ClampingOff () | |
int GetClamping () |
void SetVectorMode (int ) | |
int GetVectorMode () | |
void SetVectorModeToUseVector () | |
void SetVectorModeToUseNormal () | |
char *GetVectorModeAsString () |
void SetIndexMode (int ) | |
int GetIndexMode () | |
void SetIndexModeToScalar () | |
void SetIndexModeToVector () | |
void SetIndexModeToOff () | |
char *GetIndexModeAsString () |