Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkGlyph3D Class Reference

#include <vtkGlyph3D.h>

Inheritance diagram for vtkGlyph3D:

Inheritance graph
[legend]
Collaboration diagram for vtkGlyph3D:

Collaboration graph
[legend]
List of all members.

Detailed Description

copy oriented and scaled glyph geometry to every input point

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.

Warning:
The scaling of the glyphs is controlled 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), Alternatively (if VTK_SCALE_BY_VECTORCOMPONENTS is set), the scaling may be specified for x,y,z using the vector components. 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
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (47%)
  • Lorensen, Bill (12%)
  • Martin, Ken (9%)
  • Henderson, Amy (7%)
  • Law, Charles (6%)
  • Geveci, Berk (5%)
CVS logs (CVSweb):
  • .cxx (/Graphics/vtkGlyph3D.cxx)
  • .h (/Graphics/vtkGlyph3D.h)
Examples:
vtkGlyph3D (Examples)
Tests:
vtkGlyph3D (Tests)

Definition at line 116 of file vtkGlyph3D.h.

Public Types

typedef vtkDataSetToPolyDataFilter Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetSource (vtkPolyData *pd)
void SetSource (int id, vtkPolyData *pd)
vtkPolyDataGetSource (int id=0)
void SetNumberOfSources (int num)
int GetNumberOfSources ()
virtual void SetScaling (int)
virtual void ScalingOn ()
virtual void ScalingOff ()
virtual int GetScaling ()
virtual void SetScaleMode (int)
virtual int GetScaleMode ()
void SetScaleModeToScaleByScalar ()
void SetScaleModeToScaleByVector ()
void SetScaleModeToScaleByVectorComponents ()
void SetScaleModeToDataScalingOff ()
const char * GetScaleModeAsString ()
virtual void SetColorMode (int)
virtual int GetColorMode ()
void SetColorModeToColorByScale ()
void SetColorModeToColorByScalar ()
void SetColorModeToColorByVector ()
const char * GetColorModeAsString ()
virtual void SetScaleFactor (double)
virtual double GetScaleFactor ()
virtual void SetRange (double, double)
void SetRange (double[2])
virtual double * GetRange ()
virtual void GetRange (double data[2])
virtual void SetOrient (int)
virtual void OrientOn ()
virtual void OrientOff ()
virtual int GetOrient ()
virtual void SetClamping (int)
virtual void ClampingOn ()
virtual void ClampingOff ()
virtual int GetClamping ()
virtual void SetVectorMode (int)
virtual int GetVectorMode ()
void SetVectorModeToUseVector ()
void SetVectorModeToUseNormal ()
void SetVectorModeToVectorRotationOff ()
const char * GetVectorModeAsString ()
virtual void SetIndexMode (int)
virtual int GetIndexMode ()
void SetIndexModeToScalar ()
void SetIndexModeToVector ()
void SetIndexModeToOff ()
const char * GetIndexModeAsString ()
virtual void SetGeneratePointIds (int)
virtual int GetGeneratePointIds ()
virtual void GeneratePointIdsOn ()
virtual void GeneratePointIdsOff ()
virtual void SetPointIdsName (const char *)
virtual char * GetPointIdsName ()
virtual char * GetInputScalarsSelection ()
void SelectInputScalars (const char *fieldName)
virtual char * GetInputVectorsSelection ()
void SelectInputVectors (const char *fieldName)
virtual char * GetInputNormalsSelection ()
void SelectInputNormals (const char *fieldName)

Static Public Member Functions

int IsTypeOf (const char *type)
vtkGlyph3DSafeDownCast (vtkObject *o)
vtkGlyph3DNew ()

Protected Member Functions

 vtkGlyph3D ()
 ~vtkGlyph3D ()
void Execute ()
void ExecuteInformation ()
void ComputeInputUpdateExtents (vtkDataObject *output)
virtual void SetInputScalarsSelection (const char *)
virtual void SetInputVectorsSelection (const char *)
virtual void SetInputNormalsSelection (const char *)

Protected Attributes

int NumberOfSources
vtkPolyData ** Source
int Scaling
int ScaleMode
int ColorMode
double ScaleFactor
double Range [2]
int Orient
int VectorMode
int Clamping
int IndexMode
int GeneratePointIds
char * PointIdsName
char * InputScalarsSelection
char * InputVectorsSelection
char * InputNormalsSelection


Member Typedef Documentation

typedef vtkDataSetToPolyDataFilter vtkGlyph3D::Superclass
 

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

Definition at line 119 of file vtkGlyph3D.h.


Constructor & Destructor Documentation

vtkGlyph3D::vtkGlyph3D  )  [protected]
 

vtkGlyph3D::~vtkGlyph3D  )  [protected]
 


Member Function Documentation

virtual const char* vtkGlyph3D::GetClassName  )  [virtual]
 

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

int vtkGlyph3D::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

virtual int vtkGlyph3D::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

vtkGlyph3D* vtkGlyph3D::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

void vtkGlyph3D::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkDataSetToPolyDataFilter.

Reimplemented in vtkGlyph2D.

vtkGlyph3D* vtkGlyph3D::New  )  [static]
 

Construct object with scaling on, scaling mode is by scalar value, scale factor = 1.0, the range is (0,1), orient geometry is on, and orientation is by vector. Clamping and indexing are turned off. No initial sources are defined.

Reimplemented from vtkAlgorithm.

Reimplemented in vtkGlyph2D.

void vtkGlyph3D::SetNumberOfSources int  num  ) 
 

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

int vtkGlyph3D::GetNumberOfSources  ) 
 

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

void vtkGlyph3D::SetSource vtkPolyData pd  )  [inline]
 

Set the source to use for he glyph.

Definition at line 136 of file vtkGlyph3D.h.

void vtkGlyph3D::SetSource int  id,
vtkPolyData pd
 

Specify a source object at a specified table location.

vtkPolyData* vtkGlyph3D::GetSource int  id = 0  ) 
 

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

virtual void vtkGlyph3D::SetScaling int   )  [virtual]
 

Turn on/off scaling of source geometry.

virtual void vtkGlyph3D::ScalingOn  )  [virtual]
 

Turn on/off scaling of source geometry.

virtual void vtkGlyph3D::ScalingOff  )  [virtual]
 

Turn on/off scaling of source geometry.

virtual int vtkGlyph3D::GetScaling  )  [virtual]
 

Turn on/off scaling of source geometry.

virtual void vtkGlyph3D::SetScaleMode int   )  [virtual]
 

Either scale by scalar or by vector/normal magnitude.

virtual int vtkGlyph3D::GetScaleMode  )  [virtual]
 

Either scale by scalar or by vector/normal magnitude.

void vtkGlyph3D::SetScaleModeToScaleByScalar  )  [inline]
 

Either scale by scalar or by vector/normal magnitude.

Definition at line 155 of file vtkGlyph3D.h.

References VTK_SCALE_BY_SCALAR.

void vtkGlyph3D::SetScaleModeToScaleByVector  )  [inline]
 

Either scale by scalar or by vector/normal magnitude.

Definition at line 157 of file vtkGlyph3D.h.

References VTK_SCALE_BY_VECTOR.

void vtkGlyph3D::SetScaleModeToScaleByVectorComponents  )  [inline]
 

Either scale by scalar or by vector/normal magnitude.

Definition at line 159 of file vtkGlyph3D.h.

References VTK_SCALE_BY_VECTORCOMPONENTS.

void vtkGlyph3D::SetScaleModeToDataScalingOff  )  [inline]
 

Either scale by scalar or by vector/normal magnitude.

Definition at line 161 of file vtkGlyph3D.h.

References VTK_DATA_SCALING_OFF.

const char * vtkGlyph3D::GetScaleModeAsString void   )  [inline]
 

Return the method of scaling as a descriptive character string.

Definition at line 309 of file vtkGlyph3D.h.

References ScaleMode.

virtual void vtkGlyph3D::SetColorMode int   )  [virtual]
 

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

virtual int vtkGlyph3D::GetColorMode  )  [virtual]
 

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

void vtkGlyph3D::SetColorModeToColorByScale  )  [inline]
 

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

Definition at line 170 of file vtkGlyph3D.h.

References VTK_COLOR_BY_SCALE.

void vtkGlyph3D::SetColorModeToColorByScalar  )  [inline]
 

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

Definition at line 172 of file vtkGlyph3D.h.

References VTK_COLOR_BY_SCALAR.

void vtkGlyph3D::SetColorModeToColorByVector  )  [inline]
 

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

Definition at line 174 of file vtkGlyph3D.h.

References VTK_COLOR_BY_VECTOR.

const char * vtkGlyph3D::GetColorModeAsString void   )  [inline]
 

Return the method of coloring as a descriptive character string.

Definition at line 326 of file vtkGlyph3D.h.

References ColorMode.

virtual void vtkGlyph3D::SetScaleFactor double   )  [virtual]
 

Specify scale factor to scale object by.

virtual double vtkGlyph3D::GetScaleFactor  )  [virtual]
 

Specify scale factor to scale object by.

virtual void vtkGlyph3D::SetRange double  ,
double 
[virtual]
 

Specify range to map scalar values into.

void vtkGlyph3D::SetRange double  [2]  ) 
 

Specify range to map scalar values into.

virtual double* vtkGlyph3D::GetRange  )  [virtual]
 

Specify range to map scalar values into.

virtual void vtkGlyph3D::GetRange double  data[2]  )  [virtual]
 

Specify range to map scalar values into.

virtual void vtkGlyph3D::SetOrient int   )  [virtual]
 

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

virtual void vtkGlyph3D::OrientOn  )  [virtual]
 

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

virtual void vtkGlyph3D::OrientOff  )  [virtual]
 

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

virtual int vtkGlyph3D::GetOrient  )  [virtual]
 

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

virtual void vtkGlyph3D::SetClamping int   )  [virtual]
 

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

virtual void vtkGlyph3D::ClampingOn  )  [virtual]
 

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

virtual void vtkGlyph3D::ClampingOff  )  [virtual]
 

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

virtual int vtkGlyph3D::GetClamping  )  [virtual]
 

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

virtual void vtkGlyph3D::SetVectorMode int   )  [virtual]
 

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

virtual int vtkGlyph3D::GetVectorMode  )  [virtual]
 

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

void vtkGlyph3D::SetVectorModeToUseVector  )  [inline]
 

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

Definition at line 210 of file vtkGlyph3D.h.

References VTK_USE_VECTOR.

void vtkGlyph3D::SetVectorModeToUseNormal  )  [inline]
 

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

Definition at line 211 of file vtkGlyph3D.h.

References VTK_USE_NORMAL.

void vtkGlyph3D::SetVectorModeToVectorRotationOff  )  [inline]
 

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

Definition at line 212 of file vtkGlyph3D.h.

References VTK_VECTOR_ROTATION_OFF.

const char * vtkGlyph3D::GetVectorModeAsString void   )  [inline]
 

Return the vector mode as a character string.

Definition at line 343 of file vtkGlyph3D.h.

References VectorMode.

virtual void vtkGlyph3D::SetIndexMode int   )  [virtual]
 

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.

virtual int vtkGlyph3D::GetIndexMode  )  [virtual]
 

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 vtkGlyph3D::SetIndexModeToScalar  )  [inline]
 

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.

Definition at line 223 of file vtkGlyph3D.h.

References VTK_INDEXING_BY_SCALAR.

void vtkGlyph3D::SetIndexModeToVector  )  [inline]
 

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.

Definition at line 224 of file vtkGlyph3D.h.

References VTK_INDEXING_BY_VECTOR.

void vtkGlyph3D::SetIndexModeToOff  )  [inline]
 

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.

Definition at line 225 of file vtkGlyph3D.h.

References VTK_INDEXING_OFF.

const char * vtkGlyph3D::GetIndexModeAsString void   )  [inline]
 

Return the index mode as a character string.

Definition at line 360 of file vtkGlyph3D.h.

References IndexMode.

virtual void vtkGlyph3D::SetGeneratePointIds int   )  [virtual]
 

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual int vtkGlyph3D::GetGeneratePointIds  )  [virtual]
 

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGlyph3D::GeneratePointIdsOn  )  [virtual]
 

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGlyph3D::GeneratePointIdsOff  )  [virtual]
 

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGlyph3D::SetPointIdsName const char *   )  [virtual]
 

Set/Get the name of the PointIds array if generated. By default the Ids are named "InputPointIds", but this can be changed with this function.

virtual char* vtkGlyph3D::GetPointIdsName  )  [virtual]
 

Set/Get the name of the PointIds array if generated. By default the Ids are named "InputPointIds", but this can be changed with this function.

virtual char* vtkGlyph3D::GetInputScalarsSelection  )  [virtual]
 

If you want to use an arbitrary scalars array, then set its name here. By default this in NULL and the filter will use the active scalar array.

void vtkGlyph3D::SelectInputScalars const char *  fieldName  )  [inline]
 

If you want to use an arbitrary scalars array, then set its name here. By default this in NULL and the filter will use the active scalar array.

Definition at line 252 of file vtkGlyph3D.h.

virtual char* vtkGlyph3D::GetInputVectorsSelection  )  [virtual]
 

If you want to use an arbitrary vectors array, then set its name here. By default this in NULL and the filter will use the active vector array.

void vtkGlyph3D::SelectInputVectors const char *  fieldName  )  [inline]
 

If you want to use an arbitrary vectors array, then set its name here. By default this in NULL and the filter will use the active vector array.

Definition at line 261 of file vtkGlyph3D.h.

virtual char* vtkGlyph3D::GetInputNormalsSelection  )  [virtual]
 

If you want to use an arbitrary normals array, then set its name here. By default this in NULL and the filter will use the active normal array.

void vtkGlyph3D::SelectInputNormals const char *  fieldName  )  [inline]
 

If you want to use an arbitrary normals array, then set its name here. By default this in NULL and the filter will use the active normal array.

Definition at line 270 of file vtkGlyph3D.h.

void vtkGlyph3D::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.

Reimplemented in vtkGlyph2D.

void vtkGlyph3D::ExecuteInformation  )  [protected, virtual]
 

Reimplemented from vtkSource.

void vtkGlyph3D::ComputeInputUpdateExtents vtkDataObject output  )  [protected, virtual]
 

Do not let images return more than requested.

Reimplemented from vtkDataSetToPolyDataFilter.

virtual void vtkGlyph3D::SetInputScalarsSelection const char *   )  [protected, virtual]
 

virtual void vtkGlyph3D::SetInputVectorsSelection const char *   )  [protected, virtual]
 

virtual void vtkGlyph3D::SetInputNormalsSelection const char *   )  [protected, virtual]
 


Member Data Documentation

int vtkGlyph3D::NumberOfSources [protected]
 

Definition at line 282 of file vtkGlyph3D.h.

vtkPolyData** vtkGlyph3D::Source [protected]
 

Definition at line 283 of file vtkGlyph3D.h.

int vtkGlyph3D::Scaling [protected]
 

Definition at line 284 of file vtkGlyph3D.h.

int vtkGlyph3D::ScaleMode [protected]
 

Definition at line 285 of file vtkGlyph3D.h.

Referenced by GetScaleModeAsString().

int vtkGlyph3D::ColorMode [protected]
 

Definition at line 286 of file vtkGlyph3D.h.

Referenced by GetColorModeAsString().

double vtkGlyph3D::ScaleFactor [protected]
 

Definition at line 287 of file vtkGlyph3D.h.

double vtkGlyph3D::Range[2] [protected]
 

Definition at line 288 of file vtkGlyph3D.h.

int vtkGlyph3D::Orient [protected]
 

Definition at line 289 of file vtkGlyph3D.h.

int vtkGlyph3D::VectorMode [protected]
 

Definition at line 290 of file vtkGlyph3D.h.

Referenced by GetVectorModeAsString().

int vtkGlyph3D::Clamping [protected]
 

Definition at line 291 of file vtkGlyph3D.h.

int vtkGlyph3D::IndexMode [protected]
 

Definition at line 292 of file vtkGlyph3D.h.

Referenced by GetIndexModeAsString().

int vtkGlyph3D::GeneratePointIds [protected]
 

Definition at line 293 of file vtkGlyph3D.h.

char* vtkGlyph3D::PointIdsName [protected]
 

Definition at line 294 of file vtkGlyph3D.h.

char* vtkGlyph3D::InputScalarsSelection [protected]
 

Definition at line 296 of file vtkGlyph3D.h.

char* vtkGlyph3D::InputVectorsSelection [protected]
 

Definition at line 297 of file vtkGlyph3D.h.

char* vtkGlyph3D::InputNormalsSelection [protected]
 

Definition at line 298 of file vtkGlyph3D.h.


The documentation for this class was generated from the following file: