documentation

Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData Class Reference

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

Inherits IDisposable.

Public Member Functions

 ExtrinsicData (IntPtr handle, bool owner)
 Internal constructor of ExtrinsicData. More...
 
 ExtrinsicData (Quaternion q, Vector3 t)
 
ExtrinsicData 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

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

Constructor & Destructor Documentation

◆ ExtrinsicData()

Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.ExtrinsicData ( IntPtr  handle,
bool  owner 
)
inline

Internal constructor of ExtrinsicData.

This constructor is used internally by the VisionLib.

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

Member Function Documentation

◆ Clone()

ExtrinsicData Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.Dispose ( )
inline

Explicitly releases references to unmanaged resources.

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

◆ GetCamPosWorld()

Vector3 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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 Visometry.VisionLib.SDK.Core.API.Native.ExtrinsicData.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.