documentation

ExtrinsicDataWrapper

Functions for managing ExtrinsicDataWrapper objects. More...

Functions

VL_SDK_API void VL_CALLINGCONVENTION vlDelete_ExtrinsicDataWrapper (vlExtrinsicDataWrapper_t *extrinsicDataWrapper)
 Deletes an ExtrinsicDataWrapper object. More...
 
VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION vlExtrinsicDataWrapper_Clone (vlExtrinsicDataWrapper_t *extrinsicDataWrapper)
 Creates a copy of the ExtrinsicDataWrapper object and returns a pointer to it. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetCamPosWorld (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, float t[], unsigned int elementCount)
 Returns the position $P_{cam}$ of the camera in world coordinates. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetModelViewMatrix (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, float matrix[], unsigned int matrixElementCount)
 Returns the current camera pose as model-view matrix. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetR (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, float q[], unsigned int elementCount)
 Returns the rotation $R$ from the world coordinate system to the camera coordinate system. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetT (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, float t[], unsigned int elementCount)
 Returns the translation $t$ from the world coordinate system to the camera coordinate system. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetValid (vlExtrinsicDataWrapper_t *extrinsicDataWrapper)
 Returns whether the current tracking pose is valid (the tracking was successful). More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetCamPosWorld (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, const float t[], unsigned int elementCount)
 Sets the position $P_{cam}$ of the camera in world coordinates. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetR (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, const float q[], unsigned int elementCount)
 Sets the rotation $R$ from the world coordinate system to the camera coordinate system. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetT (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, const float t[], unsigned int elementCount)
 Sets the translation $t$ from the world coordinate system to the camera coordinate system. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetValid (vlExtrinsicDataWrapper_t *extrinsicDataWrapper, bool value)
 Sets the valid flag of the given ExtrinsicData. More...
 
VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION vlNew_ExtrinsicDataWrapper ()
 Creates a new ExtrinsicDataWrapper object and returns a pointer to it. More...
 

Detailed Description

Functions for managing ExtrinsicDataWrapper objects.

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

Function Documentation

◆ vlDelete_ExtrinsicDataWrapper()

VL_SDK_API void VL_CALLINGCONVENTION vlDelete_ExtrinsicDataWrapper ( vlExtrinsicDataWrapper_t extrinsicDataWrapper)

Deletes an ExtrinsicDataWrapper object.

Call this function if you used the vlNew_ExtrinsicDataWrapper function to create the object and you are now done using it.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.

◆ vlExtrinsicDataWrapper_Clone()

VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION vlExtrinsicDataWrapper_Clone ( vlExtrinsicDataWrapper_t extrinsicDataWrapper)

Creates a copy of the ExtrinsicDataWrapper object and returns a pointer to it.

This pointer must be released using vlDelete_ExtrinsicDataWrapper.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
Returns
A pointer to the new ExtrinsicDataWrapper object.

◆ vlExtrinsicDataWrapper_GetCamPosWorld()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetCamPosWorld ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
float  t[],
unsigned int  elementCount 
)

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$).

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
tFloat array with 3 elements $(x,y,z)$ for storing the position.
elementCountNumber of elements in the given array. This should be 3.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_GetModelViewMatrix()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetModelViewMatrix ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
float  matrix[],
unsigned int  matrixElementCount 
)

Returns the current camera pose as model-view matrix.

The returned matrix assumes a right-handed coordinate system and is stored in the following order (column-major order):

\[ \begin{bmatrix} 0 & 4 & 8 & 12\\ 1 & 5 & 9 & 13\\ 2 & 6 & 10 & 14\\ 3 & 7 & 11 & 15\\ \end{bmatrix} \]

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
matrixFloat array with 16 elements for storing the model-view matrix.
matrixElementCountNumber of elements in the given array. This should be 16.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_GetR()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetR ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
float  q[],
unsigned int  elementCount 
)

Returns the rotation $R$ from the world coordinate system to the camera coordinate system.

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$.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
qFloat array with 4 elements $(x,y,z,w)$ for storing the rotation as quaternion.
elementCountNumber of elements in the given array. This should be 4.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_GetT()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetT ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
float  t[],
unsigned int  elementCount 
)

Returns the translation $t$ from the world coordinate system to the camera coordinate system.

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$.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
tFloat array with 3 elements $(x,y,z)$ for storing the translation.
elementCountNumber of elements in the given array. This should be 3.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_GetValid()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_GetValid ( vlExtrinsicDataWrapper_t extrinsicDataWrapper)

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

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
Returns
true, if the current tracking pose is valid; false otherwise.

◆ vlExtrinsicDataWrapper_SetCamPosWorld()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetCamPosWorld ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
const float  t[],
unsigned int  elementCount 
)

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}$).

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
tFloat array with 3 elements $(x,y,z)$, which contains the position.
elementCountNumber of elements in the given array. This should be 3.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_SetR()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetR ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
const float  q[],
unsigned int  elementCount 
)

Sets the rotation $R$ from the world coordinate system to the camera coordinate system.

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$.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
qFloat array with 4 elements $(x,y,z,w)$, which contains the rotation as quaternion.
elementCountNumber of elements in the given array. This should be 4.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_SetT()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetT ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
const float  t[],
unsigned int  elementCount 
)

Sets the translation $t$ from the world coordinate system to the camera coordinate system.

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$.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
tFloat array with 3 elements $(x,y,z)$, which contain the translation.
elementCountNumber of elements in the given array. This should be 3.
Returns
true, on success; false otherwise.

◆ vlExtrinsicDataWrapper_SetValid()

VL_SDK_API bool VL_CALLINGCONVENTION vlExtrinsicDataWrapper_SetValid ( vlExtrinsicDataWrapper_t extrinsicDataWrapper,
bool  value 
)

Sets the valid flag of the given ExtrinsicData.

Parameters
extrinsicDataWrapperPointer to an ExtrinsicDataWrapper object.
valueThe new value of the valid flag.
Returns
true, if setting worked; false otherwise

◆ vlNew_ExtrinsicDataWrapper()

VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION vlNew_ExtrinsicDataWrapper ( )

Creates a new ExtrinsicDataWrapper object and returns a pointer to it.

This pointer must be released using vlDelete_ExtrinsicDataWrapper.

Returns
A pointer to a new ExtrinsicDataWrapper object.