| 
    Open CASCADE Technology 7.8.2.dev
    
   | 
 
Extended Reality (XR) Session interface. More...
#include <Aspect_XRSession.hxx>

Public Types | |
| enum | TrackingUniverseOrigin { TrackingUniverseOrigin_Seated , TrackingUniverseOrigin_Standing } | 
| Identifies which style of tracking origin the application wants to use for the poses it is requesting.  More... | |
| enum | InfoString { InfoString_Vendor , InfoString_Device , InfoString_Tracker , InfoString_SerialNumber } | 
| Info string enumeration.  More... | |
  Public Types inherited from Standard_Transient | |
| typedef void | base_type | 
| Returns a type descriptor about this object.   | |
Public Member Functions | |
| virtual bool | IsOpen () const =0 | 
| Return TRUE if session is opened.   | |
| virtual bool | Open ()=0 | 
| Initialize session.   | |
| virtual void | Close ()=0 | 
| Release session.   | |
| virtual bool | WaitPoses ()=0 | 
| Fetch actual poses of tracked devices.   | |
| virtual NCollection_Vec2< int > | RecommendedViewport () const =0 | 
| Return recommended viewport Width x Height for rendering into VR.   | |
| virtual NCollection_Mat4< double > | EyeToHeadTransform (Aspect_Eye theEye) const =0 | 
| Return transformation from eye to head.   | |
| NCollection_Mat4< double > | HeadToEyeTransform (Aspect_Eye theEye) const | 
| Return transformation from head to eye.   | |
| virtual NCollection_Mat4< double > | ProjectionMatrix (Aspect_Eye theEye, double theZNear, double theZFar) const =0 | 
| Return projection matrix.   | |
| virtual bool | HasProjectionFrustums () const =0 | 
| Return FALSE if projection frustums are unsupported and general 4x4 projection matrix should be fetched instead.   | |
| virtual void | ProcessEvents ()=0 | 
| Receive XR events.   | |
| virtual bool | SubmitEye (void *theTexture, Aspect_GraphicsLibrary theGraphicsLib, Aspect_ColorSpace theColorSpace, Aspect_Eye theEye)=0 | 
| Submit texture eye to XR Composer.   | |
| Standard_Real | UnitFactor () const | 
| Return unit scale factor defined as scale factor for m (meters); 1.0 by default.   | |
| void | SetUnitFactor (Standard_Real theFactor) | 
| Set unit scale factor.   | |
| Standard_Real | Aspect () const | 
| Return aspect ratio.   | |
| Standard_Real | FieldOfView () const | 
| Return field of view.   | |
| Standard_Real | IOD () const | 
| Return Intra-ocular Distance (IOD); also known as Interpupillary Distance (IPD). Defined in meters by default (.   | |
| Standard_ShortReal | DisplayFrequency () const | 
| Return display frequency or 0 if unknown.   | |
| const Aspect_FrustumLRBT< double > & | ProjectionFrustum (Aspect_Eye theEye) const | 
| Return projection frustum.   | |
| const gp_Trsf & | HeadPose () const | 
| Return head orientation in right-handed system: +y is up +x is to the right -z is forward Distance unit is meters by default (.   | |
| gp_Trsf | LeftHandPose () const | 
| Return left hand orientation.   | |
| gp_Trsf | RightHandPose () const | 
| Return right hand orientation.   | |
| const Aspect_TrackedDevicePoseArray & | TrackedPoses () const | 
| Return number of tracked poses array.   | |
| bool | HasTrackedPose (Standard_Integer theDevice) const | 
| Return TRUE if device orientation is defined.   | |
| virtual Standard_Integer | NamedTrackedDevice (Aspect_XRTrackedDeviceRole theDevice) const =0 | 
| Return index of tracked device of known role, or -1 if undefined.   | |
| Handle< Graphic3d_ArrayOfTriangles > | LoadRenderModel (Standard_Integer theDevice, Handle< Image_Texture > &theTexture) | 
| Load model for displaying device.   | |
| Handle< Graphic3d_ArrayOfTriangles > | LoadRenderModel (Standard_Integer theDevice, Standard_Boolean theToApplyUnitFactor, Handle< Image_Texture > &theTexture) | 
| Load model for displaying device.   | |
| virtual Aspect_XRDigitalActionData | GetDigitalActionData (const Handle< Aspect_XRAction > &theAction) const =0 | 
| Fetch data for digital input action (like button).   | |
| virtual Aspect_XRAnalogActionData | GetAnalogActionData (const Handle< Aspect_XRAction > &theAction) const =0 | 
| Fetch data for digital input action (like axis).   | |
| virtual Aspect_XRPoseActionData | GetPoseActionDataForNextFrame (const Handle< Aspect_XRAction > &theAction) const =0 | 
| Fetch data for pose input action (like fingertip position). The returned values will match the values returned by the last call to WaitPoses().   | |
| void | TriggerHapticVibrationAction (const Handle< Aspect_XRAction > &theAction, const Aspect_XRHapticActionData &theParams) | 
| Trigger vibration.   | |
| void | AbortHapticVibrationAction (const Handle< Aspect_XRAction > &theAction) | 
| Abort vibration.   | |
| TrackingUniverseOrigin | TrackingOrigin () const | 
| Return tracking origin.   | |
| virtual void | SetTrackingOrigin (TrackingUniverseOrigin theOrigin) | 
| Set tracking origin.   | |
| const Handle< Aspect_XRAction > & | GenericAction (Aspect_XRTrackedDeviceRole theDevice, Aspect_XRGenericAction theAction) const | 
| Return generic action for specific hand or NULL if undefined.   | |
| virtual TCollection_AsciiString | GetString (InfoString theInfo) const =0 | 
| Query information.   | |
  Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor.   | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing.   | |
| Standard_Transient & | operator= (const Standard_Transient &) | 
| Assignment operator, needed to avoid copying reference counter.   | |
| virtual | ~Standard_Transient () | 
| Destructor must be virtual.   | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const | 
| Returns a type descriptor about this object.   | |
| Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const | 
| Returns a true value if this is an instance of Type.   | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const | 
| Returns a true value if this is an instance of TypeName.   | |
| Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const | 
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.   | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const | 
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.   | |
| Standard_Transient * | This () const | 
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.   | |
| Standard_Integer | GetRefCount () const noexcept | 
| Get the reference counter of this object.   | |
| void | IncrementRefCounter () noexcept | 
| Increments the reference counter of this object.   | |
| Standard_Integer | DecrementRefCounter () noexcept | 
| Decrements the reference counter of this object; returns the decremented value.   | |
| virtual void | Delete () const | 
| Memory deallocator for transient classes.   | |
Protected Member Functions | |
| Aspect_XRSession () | |
| Empty constructor.   | |
| virtual Handle< Graphic3d_ArrayOfTriangles > | loadRenderModel (Standard_Integer theDevice, Standard_Boolean theToApplyUnitFactor, Handle< Image_Texture > &theTexture)=0 | 
| Load model for displaying device.   | |
| virtual void | triggerHapticVibrationAction (const Handle< Aspect_XRAction > &theAction, const Aspect_XRHapticActionData &theParams)=0 | 
| Trigger vibration.   | |
Protected Attributes | |
| NCollection_Array1< Handle< Aspect_XRAction > > | myRoleActions [Aspect_XRTrackedDeviceRole_NB] | 
| generic actions   | |
| Aspect_XRActionSetMap | myActionSets | 
| actions sets   | |
| TrackingUniverseOrigin | myTrackOrigin | 
| tracking origin   | |
| Aspect_TrackedDevicePoseArray | myTrackedPoses | 
| array of tracked poses   | |
| gp_Trsf | myHeadPose | 
| head orientation   | |
| NCollection_Vec2< int > | myRendSize | 
| viewport Width x Height for rendering into VR   | |
| Aspect_FrustumLRBT< double > | myFrustumL | 
| left eye projection frustum   | |
| Aspect_FrustumLRBT< double > | myFrustumR | 
| right eye projection frustum   | |
| Standard_Real | myUnitFactor | 
| unit scale factor defined as scale factor for m (meters)   | |
| Standard_Real | myAspect | 
| aspect ratio   | |
| Standard_Real | myFieldOfView | 
| field of view   | |
| Standard_Real | myIod | 
| intra-ocular distance in meters   | |
| Standard_ShortReal | myDispFreq | 
| display frequency   | |
Additional Inherited Members | |
  Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () | 
| Returns a type descriptor about this object.   | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () | 
| Returns type descriptor of Standard_Transient class.   | |
Extended Reality (XR) Session interface.
      
  | 
  protected | 
Empty constructor.
| void Aspect_XRSession::AbortHapticVibrationAction | ( | const Handle< Aspect_XRAction > & | theAction | ) | 
Abort vibration.
      
  | 
  inline | 
Return aspect ratio.
      
  | 
  pure virtual | 
Release session.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return display frequency or 0 if unknown.
      
  | 
  pure virtual | 
Return transformation from eye to head.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return field of view.
      
  | 
  inline | 
Return generic action for specific hand or NULL if undefined.
      
  | 
  pure virtual | 
Fetch data for digital input action (like axis).
| theAction | [in] action of Aspect_XRActionType_InputAnalog type | 
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Fetch data for digital input action (like button).
| theAction | [in] action of Aspect_XRActionType_InputDigital type | 
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Fetch data for pose input action (like fingertip position). The returned values will match the values returned by the last call to WaitPoses().
| theAction | [in] action of Aspect_XRActionType_InputPose type | 
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Query information.
Implemented in Aspect_OpenVRSession.
Return FALSE if projection frustums are unsupported and general 4x4 projection matrix should be fetched instead.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return TRUE if device orientation is defined.
Return head orientation in right-handed system: +y is up +x is to the right -z is forward Distance unit is meters by default (.
      
  | 
  inline | 
Return transformation from head to eye.
      
  | 
  inline | 
Return Intra-ocular Distance (IOD); also known as Interpupillary Distance (IPD). Defined in meters by default (.
Return TRUE if session is opened.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return left hand orientation.
      
  | 
  inline | 
Load model for displaying device.
| theDevice | [in] device index | 
| theTexture | [out] texture source | 
      
  | 
  inline | 
Load model for displaying device.
| theDevice | [in] device index | 
| theToApplyUnitFactor | [in] flag to apply unit scale factor | 
| theTexture | [out] texture source | 
      
  | 
  protectedpure virtual | 
Load model for displaying device.
| theDevice | [in] device index | 
| theToApplyUnitFactor | [in] flag to apply unit scale factor | 
| theTexture | [out] texture source | 
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Return index of tracked device of known role, or -1 if undefined.
Implemented in Aspect_OpenVRSession.
Initialize session.
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Receive XR events.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return projection frustum.
      
  | 
  pure virtual | 
Return projection matrix.
Implemented in Aspect_OpenVRSession.
      
  | 
  pure virtual | 
Return recommended viewport Width x Height for rendering into VR.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return right hand orientation.
      
  | 
  inlinevirtual | 
Set tracking origin.
Reimplemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Set unit scale factor.
      
  | 
  pure virtual | 
Submit texture eye to XR Composer.
| theTexture | [in] texture handle | 
| theGraphicsLib | [in] graphics library in which texture handle is defined | 
| theColorSpace | [in] texture color space; sRGB means no color conversion by composer; Linear means to sRGB color conversion by composer | 
| theEye | [in] eye to display | 
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return number of tracked poses array.
      
  | 
  inline | 
Return tracking origin.
| void Aspect_XRSession::TriggerHapticVibrationAction | ( | const Handle< Aspect_XRAction > & | theAction, | 
| const Aspect_XRHapticActionData & | theParams | ||
| ) | 
Trigger vibration.
      
  | 
  protectedpure virtual | 
Trigger vibration.
Implemented in Aspect_OpenVRSession.
      
  | 
  inline | 
Return unit scale factor defined as scale factor for m (meters); 1.0 by default.
Fetch actual poses of tracked devices.
Implemented in Aspect_OpenVRSession.
      
  | 
  protected | 
actions sets
      
  | 
  protected | 
aspect ratio
      
  | 
  protected | 
display frequency
      
  | 
  protected | 
field of view
      
  | 
  protected | 
left eye projection frustum
      
  | 
  protected | 
right eye projection frustum
      
  | 
  protected | 
head orientation
      
  | 
  protected | 
intra-ocular distance in meters
      
  | 
  protected | 
viewport Width x Height for rendering into VR
      
  | 
  protected | 
generic actions
      
  | 
  protected | 
array of tracked poses
      
  | 
  protected | 
tracking origin
      
  | 
  protected | 
unit scale factor defined as scale factor for m (meters)