Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkGridAxesHelper Class Reference

is a helper object used by vtkGridAxes2DActor, vtkGridAxes3DActor, and vtkGridAxesPlane2DActor. More...

#include <vtkGridAxesHelper.h>

Inheritance diagram for vtkGridAxesHelper:
Inheritance graph
[legend]
Collaboration diagram for vtkGridAxesHelper:
Collaboration graph
[legend]

Public Types

enum  Faces {
  MIN_YZ, MIN_ZX, MIN_XY, MAX_YZ,
  MAX_ZX, MAX_XY
}
 
enum  LabelMasks {
  MIN_X = 0x01, MIN_Y = 0x02, MIN_Z = 0x04, MAX_X = 0x08,
  MAX_Y = 0x010, MAX_Z = 0x020
}
 Valid values for LabelMask. More...
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
vtkTuple< vtkVector3d, 4 > GetPoints ()
 Get the 4 points in world coordinates that define the grid plane. More...
 
vtkVector2i GetActiveAxes ()
 Returns which of the 3 coordinate axes for the 2 axes for this plane: 0 for X axis, 1, for Y axis, and 3 for Z axis. More...
 
vtkTuple< bool, 4 > GetLabelVisibilities ()
 Returns the visibility for labels for each of the 4 axis defined by the face points based on the LabelMask. More...
 
vtkTuple< vtkVector3d, 4 > GetTransformedPoints ()
 Get the 4 points of the plane transformed using the transformation matrix set using SetMatrix(), if any. More...
 
vtkVector3d TransformPoint (const vtkVector3d &point)
 Transforms the give point using the Matrix. More...
 
vtkVector3d GetTransformedFaceNormal ()
 Get the normal to the grid plane face after applying the transform specified using transformation matrix. More...
 
bool UpdateForViewport (vtkViewport *viewport)
 Call this method before accessing any of the attributes in viewport space. More...
 
vtkTuple< vtkVector2i, 4 > GetViewportPoints () const
 Get the positions for the plane points in viewport coordinates. More...
 
vtkTuple< vtkVector2d, 4 > GetViewportPointsAsDouble () const
 
vtkTuple< vtkVector2d, 4 > GetViewportVectors () const
 Get the axis vectors formed using the points returned by GetViewportPoints(). More...
 
vtkTuple< vtkVector2d, 4 > GetViewportNormals () const
 Get the normals to the axis vectors in viewport space. More...
 
virtual void SetGridBounds (double, double, double, double, double, double)
 Set the bounding box defining the grid space. More...
 
virtual void SetGridBounds (double [6])
 Set the bounding box defining the grid space. More...
 
virtual doubleGetGridBounds ()
 Set the bounding box defining the grid space. More...
 
virtual void GetGridBounds (double &, double &, double &, double &, double &, double &)
 Set the bounding box defining the grid space. More...
 
virtual void GetGridBounds (double [6])
 Set the bounding box defining the grid space. More...
 
virtual void SetFace (int)
 Indicate which face of the specified bounds is this class operating with. More...
 
virtual int GetFace ()
 Indicate which face of the specified bounds is this class operating with. More...
 
virtual void SetLabelMask (unsigned int)
 Set the axes to label. More...
 
virtual unsigned int GetLabelMask ()
 Set the axes to label. More...
 
void SetMatrix (vtkMatrix4x4 *)
 Set the transform matrix to use to transform the points. More...
 
virtual vtkMatrix4x4GetMatrix ()
 Set the transform matrix to use to transform the points. More...
 
virtual bool GetBackface ()
 Get if the face is facing backwards in the current viewport. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkGridAxesHelperNew ()
 
static int IsTypeOf (const char *type)
 
static vtkGridAxesHelperSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkGridAxesHelper ()
 
 ~vtkGridAxesHelper () override
 
void SetLabelVisibilityOverrides (const vtkTuple< bool, 4 > &overrides)
 Get/Set label visibility overrides. More...
 
vtkTuple< bool, 4 > GetLabelVisibilityOverrides ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

double GridBounds [6]
 
int Face
 
unsigned int LabelMask
 
vtkMatrix4x4Matrix
 
vtkTuple< vtkVector3d, 4 > Points
 
vtkVector2i ActiveAxes
 
vtkTuple< bool, 4 > LabelVisibilities
 
vtkTuple< bool, 4 > ComputedLabelVisibilities
 
vtkTuple< bool, 4 > LabelVisibilityOverrides
 
vtkTuple< vtkVector3d, 4 > TransformedPoints
 
vtkVector3d TransformedFaceNormal
 
vtkTuple< vtkVector2i, 4 > ViewportPoints
 
vtkTuple< vtkVector2d, 4 > ViewportPointsAsDouble
 
vtkTuple< vtkVector2d, 4 > ViewportVectors
 
vtkTuple< vtkVector2d, 4 > ViewportNormals
 
bool Backface
 
vtkMTimeType GetPointsMTime
 
vtkMTimeType GetTransformedPointsMTime
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkGridAxes3DActor
 

Detailed Description

is a helper object used by vtkGridAxes2DActor, vtkGridAxes3DActor, and vtkGridAxesPlane2DActor.

vtkGridAxes2DActor, vtkGridAxes3DActor, and vtkGridAxesPlane2DActor shares a lot of the computations and logic. This class makes it possible to share all such information between these classes. This class works with a single face of the bounding box specified using the GridBounds.

Definition at line 27 of file vtkGridAxesHelper.h.

Member Typedef Documentation

◆ Superclass

Definition at line 31 of file vtkGridAxesHelper.h.

Member Enumeration Documentation

◆ Faces

Enumerator
MIN_YZ 
MIN_ZX 
MIN_XY 
MAX_YZ 
MAX_ZX 
MAX_XY 

Definition at line 45 of file vtkGridAxesHelper.h.

◆ LabelMasks

Valid values for LabelMask.

Enumerator
MIN_X 
MIN_Y 
MIN_Z 
MAX_X 
MAX_Y 
MAX_Z 

Definition at line 66 of file vtkGridAxesHelper.h.

Constructor & Destructor Documentation

◆ vtkGridAxesHelper()

vtkGridAxesHelper::vtkGridAxesHelper ( )
protected

◆ ~vtkGridAxesHelper()

vtkGridAxesHelper::~vtkGridAxesHelper ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkGridAxesHelper* vtkGridAxesHelper::New ( )
static

◆ GetClassName()

virtual const char* vtkGridAxesHelper::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkGridAxesHelper::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkGridAxesHelper::IsA ( const char *  type)
virtual

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

static vtkGridAxesHelper* vtkGridAxesHelper::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkGridAxesHelper::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkObject.

◆ SetGridBounds() [1/2]

virtual void vtkGridAxesHelper::SetGridBounds ( double  ,
double  ,
double  ,
double  ,
double  ,
double   
)
virtual

Set the bounding box defining the grid space.

This, together with the Face identify which planar surface this class is interested in. This class is designed to work with a single planar surface.

◆ SetGridBounds() [2/2]

virtual void vtkGridAxesHelper::SetGridBounds ( double  [6])
virtual

Set the bounding box defining the grid space.

This, together with the Face identify which planar surface this class is interested in. This class is designed to work with a single planar surface.

◆ GetGridBounds() [1/3]

virtual double* vtkGridAxesHelper::GetGridBounds ( )
virtual

Set the bounding box defining the grid space.

This, together with the Face identify which planar surface this class is interested in. This class is designed to work with a single planar surface.

◆ GetGridBounds() [2/3]

virtual void vtkGridAxesHelper::GetGridBounds ( double ,
double ,
double ,
double ,
double ,
double  
)
virtual

Set the bounding box defining the grid space.

This, together with the Face identify which planar surface this class is interested in. This class is designed to work with a single planar surface.

◆ GetGridBounds() [3/3]

virtual void vtkGridAxesHelper::GetGridBounds ( double  [6])
virtual

Set the bounding box defining the grid space.

This, together with the Face identify which planar surface this class is interested in. This class is designed to work with a single planar surface.

◆ SetFace()

virtual void vtkGridAxesHelper::SetFace ( int  )
virtual

Indicate which face of the specified bounds is this class operating with.

◆ GetFace()

virtual int vtkGridAxesHelper::GetFace ( )
virtual

Indicate which face of the specified bounds is this class operating with.

◆ SetLabelMask()

virtual void vtkGridAxesHelper::SetLabelMask ( unsigned  int)
virtual

Set the axes to label.

◆ GetLabelMask()

virtual unsigned int vtkGridAxesHelper::GetLabelMask ( )
virtual

Set the axes to label.

◆ GetPoints()

vtkTuple<vtkVector3d, 4> vtkGridAxesHelper::GetPoints ( )

Get the 4 points in world coordinates that define the grid plane.

The points are in anticlockwise anticlockwise order with the face normal pointing outward from the box defined by the GridBounds.

◆ GetActiveAxes()

vtkVector2i vtkGridAxesHelper::GetActiveAxes ( )

Returns which of the 3 coordinate axes for the 2 axes for this plane: 0 for X axis, 1, for Y axis, and 3 for Z axis.

The two axes are specified in order so that together with the face normal (which is point outwards from the box defined by GridBounds), they form a right-handed coordinate system.

◆ GetLabelVisibilities()

vtkTuple<bool, 4> vtkGridAxesHelper::GetLabelVisibilities ( )

Returns the visibility for labels for each of the 4 axis defined by the face points based on the LabelMask.

◆ SetMatrix()

void vtkGridAxesHelper::SetMatrix ( vtkMatrix4x4 )

Set the transform matrix to use to transform the points.

The matrix's MTime will be used to determine if the transformed points needed to be recomputed, when needed.

◆ GetMatrix()

virtual vtkMatrix4x4* vtkGridAxesHelper::GetMatrix ( )
virtual

Set the transform matrix to use to transform the points.

The matrix's MTime will be used to determine if the transformed points needed to be recomputed, when needed.

◆ GetTransformedPoints()

vtkTuple<vtkVector3d, 4> vtkGridAxesHelper::GetTransformedPoints ( )

Get the 4 points of the plane transformed using the transformation matrix set using SetMatrix(), if any.

This method to compute the transformed points the first time its called since the plane points or the transformation matrix was set.

◆ TransformPoint()

vtkVector3d vtkGridAxesHelper::TransformPoint ( const vtkVector3d point)

Transforms the give point using the Matrix.

◆ GetTransformedFaceNormal()

vtkVector3d vtkGridAxesHelper::GetTransformedFaceNormal ( )

Get the normal to the grid plane face after applying the transform specified using transformation matrix.

Similar to GetTransformedPoints(), this method will only compute when input parameters have changed since the last time this method was called.

◆ UpdateForViewport()

bool vtkGridAxesHelper::UpdateForViewport ( vtkViewport viewport)

Call this method before accessing any of the attributes in viewport space.

This computes the location of the plane in the viewport space using the specified viewport. This method should typically be called once per render.

◆ GetViewportPoints()

vtkTuple<vtkVector2i, 4> vtkGridAxesHelper::GetViewportPoints ( ) const
inline

Get the positions for the plane points in viewport coordinates.

Definition at line 146 of file vtkGridAxesHelper.h.

◆ GetViewportPointsAsDouble()

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::GetViewportPointsAsDouble ( ) const
inline

Definition at line 147 of file vtkGridAxesHelper.h.

◆ GetViewportVectors()

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::GetViewportVectors ( ) const
inline

Get the axis vectors formed using the points returned by GetViewportPoints().

These are in non-normalized form.

Definition at line 156 of file vtkGridAxesHelper.h.

◆ GetViewportNormals()

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::GetViewportNormals ( ) const
inline

Get the normals to the axis vectors in viewport space.

There are not true normals to the axis vector. These are normalized.

Definition at line 162 of file vtkGridAxesHelper.h.

◆ GetBackface()

virtual bool vtkGridAxesHelper::GetBackface ( )
virtual

Get if the face is facing backwards in the current viewport.

◆ SetLabelVisibilityOverrides()

void vtkGridAxesHelper::SetLabelVisibilityOverrides ( const vtkTuple< bool, 4 > &  overrides)
inlineprotected

Get/Set label visibility overrides.

This is more of a hack. We needed a mechanism to override which labels are drawn in vtkGridAxes3DActor. This makes that possible.

Definition at line 180 of file vtkGridAxesHelper.h.

◆ GetLabelVisibilityOverrides()

vtkTuple<bool, 4> vtkGridAxesHelper::GetLabelVisibilityOverrides ( )
inlineprotected

Definition at line 184 of file vtkGridAxesHelper.h.

Friends And Related Function Documentation

◆ vtkGridAxes3DActor

friend class vtkGridAxes3DActor
friend

Definition at line 185 of file vtkGridAxesHelper.h.

Member Data Documentation

◆ GridBounds

double vtkGridAxesHelper::GridBounds[6]
protected

Definition at line 187 of file vtkGridAxesHelper.h.

◆ Face

int vtkGridAxesHelper::Face
protected

Definition at line 188 of file vtkGridAxesHelper.h.

◆ LabelMask

unsigned int vtkGridAxesHelper::LabelMask
protected

Definition at line 189 of file vtkGridAxesHelper.h.

◆ Matrix

vtkMatrix4x4* vtkGridAxesHelper::Matrix
protected

Definition at line 190 of file vtkGridAxesHelper.h.

◆ Points

vtkTuple<vtkVector3d, 4> vtkGridAxesHelper::Points
protected

Definition at line 192 of file vtkGridAxesHelper.h.

◆ ActiveAxes

vtkVector2i vtkGridAxesHelper::ActiveAxes
protected

Definition at line 193 of file vtkGridAxesHelper.h.

◆ LabelVisibilities

vtkTuple<bool, 4> vtkGridAxesHelper::LabelVisibilities
protected

Definition at line 194 of file vtkGridAxesHelper.h.

◆ ComputedLabelVisibilities

vtkTuple<bool, 4> vtkGridAxesHelper::ComputedLabelVisibilities
protected

Definition at line 195 of file vtkGridAxesHelper.h.

◆ LabelVisibilityOverrides

vtkTuple<bool, 4> vtkGridAxesHelper::LabelVisibilityOverrides
protected

Definition at line 196 of file vtkGridAxesHelper.h.

◆ TransformedPoints

vtkTuple<vtkVector3d, 4> vtkGridAxesHelper::TransformedPoints
protected

Definition at line 198 of file vtkGridAxesHelper.h.

◆ TransformedFaceNormal

vtkVector3d vtkGridAxesHelper::TransformedFaceNormal
protected

Definition at line 199 of file vtkGridAxesHelper.h.

◆ ViewportPoints

vtkTuple<vtkVector2i, 4> vtkGridAxesHelper::ViewportPoints
protected

Definition at line 201 of file vtkGridAxesHelper.h.

◆ ViewportPointsAsDouble

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::ViewportPointsAsDouble
protected

Definition at line 202 of file vtkGridAxesHelper.h.

◆ ViewportVectors

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::ViewportVectors
protected

Definition at line 203 of file vtkGridAxesHelper.h.

◆ ViewportNormals

vtkTuple<vtkVector2d, 4> vtkGridAxesHelper::ViewportNormals
protected

Definition at line 204 of file vtkGridAxesHelper.h.

◆ Backface

bool vtkGridAxesHelper::Backface
protected

Definition at line 205 of file vtkGridAxesHelper.h.

◆ GetPointsMTime

vtkMTimeType vtkGridAxesHelper::GetPointsMTime
protected

Definition at line 207 of file vtkGridAxesHelper.h.

◆ GetTransformedPointsMTime

vtkMTimeType vtkGridAxesHelper::GetTransformedPointsMTime
protected

Definition at line 208 of file vtkGridAxesHelper.h.


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