Documentation for vtkGlyph3D

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:

vtkTensorGlyph

 

Methods:

void vtkGlyph3D ()
void vtkGlyph3D ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkGlyph3D *New ()
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 ()
void Execute ()

 

Detailed Method Descriptions:

Override update method because execution can branch two ways (via Input and Source).

void Update ()

Get the number of source objects used to define the glyph table. Specify the number of sources before defining a table of glyphs.

int GetNumberOfSources ()
void SetNumberOfSources (int )

Set the source to use for he glyph.

void SetSource (vtkPolyData *)

Specify a source object at a specified table location.

void SetSource (int ,vtkPolyData *)

Get a pointer to a source object at a specified table location.

vtkPolyData *GetSource (int )

Turn on/off scaling of source geometry.

void SetScaling (int )
void ScalingOn ()
void ScalingOff ()
int GetScaling ()

Either scale by scalar or by vector/normal magnitude.

void SetScaleMode (int )
int GetScaleMode ()
void SetScaleModeToScaleByScalar ()
void SetScaleModeToScaleByVector ()
void SetScaleModeToDataScalingOff ()
char *GetScaleModeAsString ()

Either color by scale, scalar or by vector/normal magnitude.

void SetColorMode (int )
int GetColorMode ()
void SetColorModeToColorByScale ()
void SetColorModeToColorByScalar ()
void SetColorModeToColorByVector ()
char *GetColorModeAsString ()

Specify scale factor to scale object by.

void SetScaleFactor (float )
float GetScaleFactor ()

Specify range to map scalar values into.

void SetRange (float ,float )
void SetRange (float *)
float *GetRange ()

Turn on/off orienting of input geometry along vector/normal.

void SetOrient (int )
void OrientOn ()
void OrientOff ()
int GetOrient ()

Turn on/off clamping of "scalar" values to range. (Scalar value may be vector magnitude if ScaleByVector() is enabled.)

void SetClamping (int )
void ClampingOn ()
void ClampingOff ()
int GetClamping ()

Specify whether to use vector or normal to perform vector operations.

void SetVectorMode (int )
int GetVectorMode ()
void SetVectorModeToUseVector ()
void SetVectorModeToUseNormal ()
char *GetVectorModeAsString ()

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

void SetIndexMode (int )
int GetIndexMode ()
void SetIndexModeToScalar ()
void SetIndexModeToVector ()
void SetIndexModeToOff ()
char *GetIndexModeAsString ()