documentation

VLExtrinsicDataWrapper Class Reference

The VLExtrinsicDataWrapper is a wrapper for an ExtrinsicData object. ExtrinsicData objects represent the extrinsic camera parameters (position and orientation). More...

Inherits IDisposable.

Public Member Functions

 VLExtrinsicDataWrapper (IntPtr handle, bool owner)
 Constructor of VLExtrinsicDataWrapper. More...
 
 VLExtrinsicDataWrapper (Quaternion q, Vector3 t)
 
VLExtrinsicDataWrapper Clone ()
 Creates a copy of this object and returns a Wrapper of it. More...
 
void Dispose ()
 Explicitly releases references to unmanaged resources. More...
 
Vector3 GetCamPosWorld ()
 Returns the position $P_{cam}$ of the camera in world coordinates. More...
 
IntPtr getHandle ()
 
Matrix4x4 GetModelViewMatrix ()
 Returns the current camera pose as model-view matrix. More...
 
Quaternion GetR ()
 Returns the rotation $R$ of the ExtrinsicData. More...
 
Vector3 GetT ()
 Returns the translation $t$ of the ExtrinsicData. More...
 
bool GetValid ()
 Returns whether the current tracking pose is valid (the tracking was successful). More...
 
void SetCamPosWorld (Vector3 camPos)
 Sets the position $P_{cam}$ of the camera in world coordinates. More...
 
void SetFromCamera (Camera camera)
 
void SetR (Quaternion rotation)
 Sets the rotation $R$ of the ExtrinsicData. More...
 
void SetT (Vector3 translation)
 Sets the translation $t$ of the ExtrinsicData. More...
 
void SetValid (bool value)
 

Detailed Description

The VLExtrinsicDataWrapper is a wrapper for an ExtrinsicData object. ExtrinsicData objects represent the extrinsic camera parameters (position and orientation).

See also
VLDataSetWrapper.GetExtrinsicData

Constructor & Destructor Documentation

◆ VLExtrinsicDataWrapper()

VLExtrinsicDataWrapper.VLExtrinsicDataWrapper ( IntPtr  handle,
bool  owner 
)
inline

Constructor of VLExtrinsicDataWrapper.

Don't call this constructor directly. Use VLExtrinsicDataWrapper.VLExtrinsicDataWrapper instead.

Parameters
handleHandle to the native object.
ownertrue, if the VLExtrinsicDataWrapper is the owner of the native object; false, otherwise.

Member Function Documentation

◆ Clone()

VLExtrinsicDataWrapper VLExtrinsicDataWrapper.Clone ( )
inline

Creates a copy of this object and returns a Wrapper of it.

Returns
A wrapper of a copy of this object.

◆ Dispose()

void VLExtrinsicDataWrapper.Dispose ( )
inline

Explicitly releases references to unmanaged resources.

Call Dispose when you are finished using the VLExtrinsicDataWrapper. The Dispose method leaves the VLExtrinsicDataWrapper in an unusable state. After calling Dispose, you must release all references to the VLExtrinsicDataWrapper so the garbage collector can reclaim the memory that the VLExtrinsicDataWrapper was occupying.

◆ GetCamPosWorld()

Vector3 VLExtrinsicDataWrapper.GetCamPosWorld ( )
inline

Returns the position $P_{cam}$ of the camera in world coordinates.

Internally the position $P_{cam}$ will be computed from the transformation $(R,t)$ which transforms a 3D point from world coordinates into camera coordinates ( $P_{cam} = -R^{-1}t$). Throws an InvalidOperationExcception, if the operation cannot be processed.

Returns
Position of the camera in world coordinates.

◆ GetModelViewMatrix()

Matrix4x4 VLExtrinsicDataWrapper.GetModelViewMatrix ( )
inline

Returns the current camera pose as model-view matrix.

The returned matrix assumes a right-handed coordinate system. Throws an InvalidOperationExcception, if the ModelViewMatrix is invalid or can not be retrieved.

◆ GetR()

Quaternion VLExtrinsicDataWrapper.GetR ( )
inline

Returns the rotation $R$ of the ExtrinsicData.

Please notice, that $(R,t)$ represents the transformation of a 3D point $P_w$ from world coordinates into a 3D point $P_c$ in camera coordinates: $P_c = RP_w + t$. Throws an InvalidOperationExcception, if the Rotation is invalid or can not be retrieved.

Returns
Rotation of the ExtrinsicData as Quaternion

◆ GetT()

Vector3 VLExtrinsicDataWrapper.GetT ( )
inline

Returns the translation $t$ of the ExtrinsicData.

Please notice, that $(R,t)$ represents the transformation of a 3D point $P_w$ from world coordinates into a 3D point $P_c$ in camera coordinates: $P_c = RP_w + t$. Throws an InvalidOperationExcception, if the Translation is invalid or can not be set.

Returns
Translation of the ExtrinsicData

◆ GetValid()

bool VLExtrinsicDataWrapper.GetValid ( )
inline

Returns whether the current tracking pose is valid (the tracking was successful).

Returns
true, if the current tracking pose is valid; false otherwise.

◆ SetCamPosWorld()

void VLExtrinsicDataWrapper.SetCamPosWorld ( Vector3  camPos)
inline

Sets the position $P_{cam}$ of the camera in world coordinates.

Internally this will be stored as a transformation $(R,t)$ of a 3D point from world coordinates into camera coordinates ( $t = -RP_{cam}$). Throws an InvalidOperationExcception, if the operation cannot be processed.

◆ SetR()

void VLExtrinsicDataWrapper.SetR ( Quaternion  rotation)
inline

Sets the rotation $R$ of the ExtrinsicData.

Please notice, that $(R,t)$ represents the transformation of a 3D point $P_w$ from world coordinates into a 3D point $P_c$ in camera coordinates: $P_c = RP_w + t$. Throws an InvalidOperationExcception, if the Rotation is invalid or can not be set.

◆ SetT()

void VLExtrinsicDataWrapper.SetT ( Vector3  translation)
inline

Sets the translation $t$ of the ExtrinsicData.

Please notice, that $(R,t)$ represents the transformation of a 3D point $P_w$ from world coordinates into a 3D point $P_c$ in camera coordinates: $P_c = RP_w + t$. Throws an InvalidOperationExcception, if the Translation is invalid or can not be changed.