VTK
9.4.20241203
|
Abstract zSpace SDK manager class. More...
#include <vtkZSpaceSDKManager.h>
Public Types | |
enum | StereoDisplayMode { QUAD_BUFFER_STEREO = 0 , STEREO_DISPLAY_API = 1 } |
enum | ButtonIds { MiddleButton = 0 , RightButton = 1 , LeftButton = 2 , NumberOfButtons = 3 } |
enum | ButtonState { Down = 0 , Pressed = 1 , Up = 2 , None = 3 , NumberOfStates = 4 } |
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. | |
vtkZSpaceSDKManager * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | InitializeZSpace ()=0 |
Initialize the zSpace SDK and check for zSpace devices : the display, the stylus and the head trackers. | |
virtual void | UpdateViewport ()=0 |
Update the zSpace viewport position and size based on the position and size of the application window. | |
virtual void | UpdateTrackers ()=0 |
Update the position of the stylus and head trackers. | |
virtual void | UpdateViewAndProjectionMatrix ()=0 |
Update the zSpace view and projection matrix for each eye. | |
virtual void | UpdateButtonState ()=0 |
Update the stylus buttons state. | |
virtual void | CalculateFrustumFit (const double bounds[6], double position[3], double viewUp[3])=0 |
Let zSpace compute the viewer scale, camera position and camera view up from the input bounds. | |
virtual void | ShutDown () |
Shutdown the zSpace SDK (clean its internal state). | |
virtual StereoDisplayMode | GetStereoDisplayMode () |
void | Update () |
Update the viewport, the trackers and the camera matrix by calling the zSpace SDK. | |
virtual int | GetWindowX () |
Get the x position of the upper left corner of the zSpace display in the virtual desktop. | |
virtual int | GetWindowY () |
Get the y position of the upper left corner of the zSpace display in the virtual desktop. | |
virtual int | GetWindowWidth () |
Get the x resolution in pixels of the zSpace display. | |
virtual int | GetWindowHeight () |
Get the y resolution in pixels of the zSpace display. | |
virtual int | GetStylusTargets () |
Get the number of stylus connected to the zSpace device. | |
virtual int | GetHeadTargets () |
Get the number of glasses connected to the zSpace device. | |
virtual int | GetSecondaryTargets () |
Get the number of secondary targets connected to the zSpace device. | |
void | SetClippingRange (const float nearPlane, const float farPlane) |
Set the near and far plane. | |
virtual float | GetViewerScale () |
Get the viewer scale. | |
virtual float | GetNearPlane () |
Get the near plane. | |
virtual float | GetFarPlane () |
Get the far plane. | |
virtual vtkMatrix4x4 * | GetCenterEyeViewMatrix () |
Get the zSpace view matrix without stereo (eye set as EYE_CENTER) in row major format (VTK format) | |
vtkMatrix4x4 * | GetStereoViewMatrix (bool leftEye) |
Get the zSpace view matrix for the right or left eye in row major format (VTK format) | |
virtual vtkMatrix4x4 * | GetCenterEyeProjectionMatrix () |
Get the zSpace projection matrix without stereo (eye set as EYE_CENTER) in row major format (VTK format) | |
vtkMatrix4x4 * | GetStereoProjectionMatrix (bool leftEye) |
Get the zSpace projection matrix for the right or left eye in row major format (VTK format) | |
virtual vtkMatrix4x4 * | GetStylusMatrixColMajor () |
Get the zSpace stylus matrix in world space. | |
virtual vtkMatrix4x4 * | GetStylusMatrixRowMajor () |
Get the zSpace stylus matrix in world space. | |
virtual vtkTransform * | GetStylusTransformRowMajor () |
Get the zSpace stylus transform in world space. | |
virtual void | BeginFrame ()=0 |
Notify the zSpace SDK for the beginning/end of a frame (vtkZSpaceCoreCompatibility only) | |
virtual void | EndFrame ()=0 |
Notify the zSpace SDK for the beginning/end of a frame (vtkZSpaceCoreCompatibility only) | |
virtual void | EnableGraphicsBinding () |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire). | |
virtual void | SubmitFrame (unsigned int vtkNotUsed(leftText), unsigned int vtkNotUsed(rightText)) |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire). | |
virtual void | GetPerEyeImageResolution (int *vtkNotUsed(width), int *vtkNotUsed(height)) |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire). | |
virtual void | SetStereoDisplayEnabled (bool vtkNotUsed(enabled)) |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire). | |
virtual bool | GetStereoDisplayEnabled () |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire). | |
virtual void | SetRenderWindow (vtkRenderWindow *renderWindow) |
Set the render windwow the manager makes viewport computations from. | |
virtual float | GetInterPupillaryDistance () |
Get/Set the distance between the eyes in meters. | |
virtual void | SetInterPupillaryDistance (float) |
Get/Set the distance between the eyes in meters. | |
virtual int | GetLeftButtonState () |
Get/Set the state of the left button of the stylus. | |
vtkSetEnumMacro (LeftButtonState, ButtonState) | |
Get/Set the state of the left button of the stylus. | |
virtual int | GetMiddleButtonState () |
Get/Set the state of the middle button of the stylus. | |
vtkSetEnumMacro (MiddleButtonState, ButtonState) | |
Get/Set the state of the middle button of the stylus. | |
virtual int | GetRightButtonState () |
Get/Set the state of the right button of the stylus. | |
vtkSetEnumMacro (RightButtonState, ButtonState) | |
Get/Set the state of the right button of the stylus. | |
Public Member Functions inherited from vtkObject | |
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. | |
Public Member Functions inherited from vtkObjectBase | |
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 vtkTypeBool | IsTypeOf (const char *type) |
static vtkZSpaceSDKManager * | SafeDownCast (vtkObjectBase *o) |
static vtkZSpaceSDKManager * | GetInstance () |
Return the singleton instance (with no reference counting) of a vtkZSpaceCoreSDKManager or vtkZSpaceCoreCompatibilitySDKManager depending on the current zSpaceSDK in use. | |
Static Public Member Functions inherited from vtkObject | |
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 Public Member Functions inherited from vtkObjectBase | |
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 |
vtkZSpaceSDKManager () | |
~vtkZSpaceSDKManager () override | |
Protected Member Functions inherited from vtkObject | |
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. | |
Protected Member Functions inherited from vtkObjectBase | |
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 &) |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
Abstract zSpace SDK manager class.
Abstract class handling the interactions between the zSpace plugin and the zSpace SDK. The implementation of virtual functions depend of the version of the zSpace SDK currently used : "zSpace Core SDK" (older) and zSpace Core Compatibility SDK (newer).
This class encapsulates all the calls to the zSpace SDK :
For button states, the states Down/Up are set by this class; whereas the states Pressed/None should be set by the calling class when the state Down/Up has been processed, to ensure that the same input won't be processed multiple times.
Definition at line 49 of file vtkZSpaceSDKManager.h.
Definition at line 52 of file vtkZSpaceSDKManager.h.
Enumerator | |
---|---|
QUAD_BUFFER_STEREO | |
STEREO_DISPLAY_API |
Definition at line 123 of file vtkZSpaceSDKManager.h.
Enumerator | |
---|---|
MiddleButton | |
RightButton | |
LeftButton | |
NumberOfButtons |
Definition at line 254 of file vtkZSpaceSDKManager.h.
Enumerator | |
---|---|
Down | |
Pressed | |
Up | |
None | |
NumberOfStates |
Definition at line 262 of file vtkZSpaceSDKManager.h.
|
protected |
|
overrideprotected |
|
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.
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
static |
|
protectedvirtual |
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
vtkZSpaceSDKManager * vtkZSpaceSDKManager::NewInstance | ( | ) | const |
|
overridevirtual |
|
static |
Return the singleton instance (with no reference counting) of a vtkZSpaceCoreSDKManager or vtkZSpaceCoreCompatibilitySDKManager depending on the current zSpaceSDK in use.
|
pure virtual |
Initialize the zSpace SDK and check for zSpace devices : the display, the stylus and the head trackers.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Update the zSpace viewport position and size based on the position and size of the application window.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Update the position of the stylus and head trackers.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Update the zSpace view and projection matrix for each eye.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Update the stylus buttons state.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Let zSpace compute the viewer scale, camera position and camera view up from the input bounds.
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Notify the zSpace SDK for the beginning/end of a frame (vtkZSpaceCoreCompatibility only)
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
pure virtual |
Notify the zSpace SDK for the beginning/end of a frame (vtkZSpaceCoreCompatibility only)
Implemented in vtkZSpaceCoreCompatibilitySDKManager, and vtkZSpaceCoreSDKManager.
|
inlinevirtual |
Shutdown the zSpace SDK (clean its internal state).
Useful to re-initialize the zSpace SDK from a clean state.
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager.
Definition at line 109 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire).
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager.
Definition at line 116 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire).
Definition at line 117 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire).
Definition at line 118 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire).
Definition at line 119 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
These functions are overriden by vtkZSpaceCoreCompatibility (specific to zSpace Inspire).
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager.
Definition at line 120 of file vtkZSpaceSDKManager.h.
|
inlinevirtual |
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager.
Definition at line 129 of file vtkZSpaceSDKManager.h.
|
virtual |
Set the render windwow the manager makes viewport computations from.
Reimplemented in vtkZSpaceCoreCompatibilitySDKManager.
void vtkZSpaceSDKManager::Update | ( | ) |
Update the viewport, the trackers and the camera matrix by calling the zSpace SDK.
|
virtual |
Get the x position of the upper left corner of the zSpace display in the virtual desktop.
|
virtual |
Get the y position of the upper left corner of the zSpace display in the virtual desktop.
|
virtual |
Get the x resolution in pixels of the zSpace display.
|
virtual |
Get the y resolution in pixels of the zSpace display.
|
virtual |
Get the number of stylus connected to the zSpace device.
|
virtual |
Get the number of glasses connected to the zSpace device.
|
virtual |
Get the number of secondary targets connected to the zSpace device.
|
virtual |
Get/Set the distance between the eyes in meters.
|
virtual |
Get/Set the distance between the eyes in meters.
void vtkZSpaceSDKManager::SetClippingRange | ( | const float | nearPlane, |
const float | farPlane | ||
) |
Set the near and far plane.
|
virtual |
Get the viewer scale.
|
virtual |
Get the near plane.
|
virtual |
Get the far plane.
|
virtual |
Get the zSpace view matrix without stereo (eye set as EYE_CENTER) in row major format (VTK format)
vtkMatrix4x4 * vtkZSpaceSDKManager::GetStereoViewMatrix | ( | bool | leftEye | ) |
Get the zSpace view matrix for the right or left eye in row major format (VTK format)
|
virtual |
Get the zSpace projection matrix without stereo (eye set as EYE_CENTER) in row major format (VTK format)
vtkMatrix4x4 * vtkZSpaceSDKManager::GetStereoProjectionMatrix | ( | bool | leftEye | ) |
Get the zSpace projection matrix for the right or left eye in row major format (VTK format)
|
virtual |
Get the zSpace stylus matrix in world space.
The matrix is in column major format and can be used by OpenGL.
|
virtual |
Get the zSpace stylus matrix in world space.
The matrix is in row major format and can be used by VTK.
|
virtual |
Get the zSpace stylus transform in world space.
The transform has for matrix StylusMatrixRowMajor
|
virtual |
Get/Set the state of the left button of the stylus.
vtkZSpaceSDKManager::vtkSetEnumMacro | ( | LeftButtonState | , |
ButtonState | |||
) |
Get/Set the state of the left button of the stylus.
|
virtual |
Get/Set the state of the middle button of the stylus.
vtkZSpaceSDKManager::vtkSetEnumMacro | ( | MiddleButtonState | , |
ButtonState | |||
) |
Get/Set the state of the middle button of the stylus.
|
virtual |
Get/Set the state of the right button of the stylus.
vtkZSpaceSDKManager::vtkSetEnumMacro | ( | RightButtonState | , |
ButtonState | |||
) |
Get/Set the state of the right button of the stylus.
|
protected |
Definition at line 299 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 301 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 302 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 303 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 304 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 305 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 306 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 309 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 312 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 313 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 315 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 316 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 317 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 318 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 321 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 323 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 325 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 327 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 330 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 331 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 333 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 335 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 338 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 339 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 340 of file vtkZSpaceSDKManager.h.
|
protected |
Definition at line 342 of file vtkZSpaceSDKManager.h.