is a helper object used by vtkGridAxes2DActor, vtkGridAxes3DActor, and vtkGridAxesPlane2DActor. More...
#include <vtkGridAxesHelper.h>
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 double * | GetGridBounds () |
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 vtkMatrix4x4 * | GetMatrix () |
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) |
vtkCommand * | GetCommand (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) |
vtkCommand * | GetCommand (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 vtkGridAxesHelper * | New () |
static int | IsTypeOf (const char *type) |
static vtkGridAxesHelper * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
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 vtkObjectBase * | New () |
static vtkObjectBase * | New () |
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 |
vtkMatrix4x4 * | Matrix |
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 |
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.
Definition at line 31 of file vtkGridAxesHelper.h.
Enumerator | |
---|---|
MIN_YZ | |
MIN_ZX | |
MIN_XY | |
MAX_YZ | |
MAX_ZX | |
MAX_XY |
Definition at line 45 of file vtkGridAxesHelper.h.
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.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Reimplemented from vtkObjectBase.
|
static |
|
overridevirtual |
Reimplemented from vtkObject.
|
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.
|
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.
|
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.
|
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.
|
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.
|
virtual |
Indicate which face of the specified bounds is this class operating with.
|
virtual |
Indicate which face of the specified bounds is this class operating with.
|
virtual |
Set the axes to label.
|
virtual |
Set the axes to label.
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.
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.
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.
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.
|
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.
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.
vtkVector3d vtkGridAxesHelper::TransformPoint | ( | const vtkVector3d & | point | ) |
Transforms the give point using the Matrix.
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.
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.
|
inline |
Get the positions for the plane points in viewport coordinates.
Definition at line 146 of file vtkGridAxesHelper.h.
|
inline |
Definition at line 147 of file vtkGridAxesHelper.h.
|
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.
|
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.
|
virtual |
Get if the face is facing backwards in the current viewport.
|
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.
|
inlineprotected |
Definition at line 184 of file vtkGridAxesHelper.h.
|
friend |
Definition at line 185 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 187 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 188 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 189 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 190 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 192 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 193 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 194 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 195 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 196 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 198 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 199 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 201 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 202 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 203 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 204 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 205 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 207 of file vtkGridAxesHelper.h.
|
protected |
Definition at line 208 of file vtkGridAxesHelper.h.