VTK
9.5.20250807
|
is a helper object used by vtkGridAxesActor2D, vtkGridAxesActor3D, and vtkGridAxesPlane2DActor. More...
#include <vtkGridAxesHelper.h>
Public Types | |
enum | Faces : unsigned char { MIN_YZ = 0x01 , MIN_ZX = 0x02 , MIN_XY = 0x04 , MAX_YZ = 0x08 , MAX_ZX = 0x010 , MAX_XY = 0x020 } |
enum | LabelMasks : unsigned char { 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 vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkGridAxesHelper * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
vtkTuple< vtkVector3d, 4 > | GetPoints () |
Get the 4 points in world coordinates that define the grid plane. | |
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. | |
vtkTuple< bool, 4 > | GetLabelVisibilities () |
Returns the visibility for labels for each of the 4 axis defined by the face points based on the LabelMask. | |
vtkTuple< vtkVector3d, 4 > | GetTransformedPoints () |
Get the 4 points of the plane transformed using the transformation matrix set using SetMatrix(), if any. | |
vtkVector3d | TransformPoint (const vtkVector3d &point) |
Transforms the give point using the Matrix. | |
vtkVector3d | GetTransformedFaceNormal () |
Get the normal to the grid plane face after applying the transform specified using transformation matrix. | |
bool | UpdateForViewport (vtkViewport *viewport) |
Call this method before accessing any of the attributes in viewport space. | |
vtkTuple< vtkVector2i, 4 > | GetViewportPoints () const |
Get the positions for the plane points in viewport coordinates. | |
vtkTuple< vtkVector2d, 4 > | GetViewportPointsAsDouble () const |
vtkTuple< vtkVector2d, 4 > | GetViewportVectors () const |
Get the axis vectors formed using the points returned by GetViewportPoints(). | |
vtkTuple< vtkVector2d, 4 > | GetViewportNormals () const |
Get the normals to the axis vectors in viewport space. | |
virtual void | SetGridBounds (double, double, double, double, double, double) |
Set the bounding box defining the grid space. | |
virtual void | SetGridBounds (double[6]) |
Set the bounding box defining the grid space. | |
virtual double * | GetGridBounds () |
Set the bounding box defining the grid space. | |
virtual void | GetGridBounds (double &, double &, double &, double &, double &, double &) |
Set the bounding box defining the grid space. | |
virtual void | GetGridBounds (double[6]) |
Set the bounding box defining the grid space. | |
virtual void | SetFace (int) |
Indicate which face of the specified bounds is this class operating with. | |
virtual int | GetFace () |
Indicate which face of the specified bounds is this class operating with. | |
virtual void | SetLabelMask (unsigned int) |
Set the axes to label. | |
virtual unsigned int | GetLabelMask () |
Set the axes to label. | |
void | SetMatrix (vtkMatrix4x4 *) |
Set the transform matrix to use to transform the points. | |
virtual vtkMatrix4x4 * | GetMatrix () |
Set the transform matrix to use to transform the points. | |
virtual bool | GetBackface () |
Get if the face is facing backwards in the current viewport. | |
![]() | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
vtkTypeBool | InvokeEvent (unsigned long event) |
vtkTypeBool | InvokeEvent (const char *event) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
![]() | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual std::string | GetObjectDescription () const |
The object description printed in messages and PrintSelf output. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual bool | UsesGarbageCollector () const |
Indicate whether the class uses vtkGarbageCollector or not. | |
Static Public Member Functions | |
static vtkGridAxesHelper * | New () |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkGridAxesHelper * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (vtkTypeBool val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static vtkTypeBool | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
![]() | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkGridAxesHelper () | |
~vtkGridAxesHelper () override | |
void | SetLabelVisibilityOverrides (const vtkTuple< bool, 4 > &overrides) |
Get/Set label visibility overrides. | |
vtkTuple< bool, 4 > | GetLabelVisibilityOverrides () |
![]() | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
virtual void | ObjectFinalize () |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Friends | |
class | vtkGridAxesActor3D |
Additional Inherited Members | |
![]() | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
std::string | ObjectName |
![]() | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
is a helper object used by vtkGridAxesActor2D, vtkGridAxesActor3D, and vtkGridAxesPlane2DActor.
vtkGridAxesActor2D, vtkGridAxesActor3D, 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 31 of file vtkGridAxesHelper.h.
Definition at line 35 of file vtkGridAxesHelper.h.
enum vtkGridAxesHelper::Faces : unsigned char |
Enumerator | |
---|---|
MIN_YZ | |
MIN_ZX | |
MIN_XY | |
MAX_YZ | |
MAX_ZX | |
MAX_XY |
Definition at line 51 of file vtkGridAxesHelper.h.
enum vtkGridAxesHelper::LabelMasks : unsigned char |
Valid values for LabelMask.
Enumerator | |
---|---|
MIN_X | |
MIN_Y | |
MIN_Z | |
MAX_X | |
MAX_Y | |
MAX_Z |
Definition at line 74 of file vtkGridAxesHelper.h.
|
protected |
|
overrideprotected |
|
static |
|
static |
|
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectBase.
|
static |
|
protectedvirtual |
vtkGridAxesHelper * vtkGridAxesHelper::NewInstance | ( | ) | const |
|
overridevirtual |
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 vtkObjectBase.
|
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.
Defaults to [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
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.
Defaults to [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
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.
Defaults to [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
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.
Defaults to [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
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.
Defaults to [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
virtual |
Indicate which face of the specified bounds is this class operating with.
By default, Face is vtkGridAxesHelper::MIN_YZ.
|
virtual |
Indicate which face of the specified bounds is this class operating with.
By default, Face is vtkGridAxesHelper::MIN_YZ.
|
virtual |
Set the axes to label.
By default, all axes are labeled i.e. LabelMask = 0xff.
|
virtual |
Set the axes to label.
By default, all axes are labeled i.e. LabelMask = 0xff.
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 156 of file vtkGridAxesHelper.h.
|
inline |
Definition at line 157 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 166 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 172 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 vtkGridAxesActor3D. This makes that possible.
Definition at line 190 of file vtkGridAxesHelper.h.
|
inlineprotected |
Definition at line 194 of file vtkGridAxesHelper.h.
|
friend |
Definition at line 195 of file vtkGridAxesHelper.h.