Functions that do not fit into any other group. More...
Typedefs | |
typedef TangoErrorType(* | TangoSupport_GetCameraIntrinsicsFn) (TangoCameraId camera_id, TangoCameraIntrinsics *intrinsics) |
Typedef for getCameraIntrinsics function signature; required by the TangoSupport_initialize method. More... | |
typedef TangoErrorType(* | TangoSupport_GetPoseAtTimeFn) (double timestamp, TangoCoordinateFramePair frame, TangoPoseData *pose) |
Typedef for getPostAtTime function signature; required by the TangoSupport_initialize method. More... | |
Enumerations | |
enum | TangoSupport_Rotation { TANGO_SUPPORT_ROTATION_IGNORED = -1, TANGO_SUPPORT_ROTATION_0 = 0, TANGO_SUPPORT_ROTATION_90 = 1, TANGO_SUPPORT_ROTATION_180 = 2, TANGO_SUPPORT_ROTATION_270 = 3 } |
Functions | |
TangoSupport_Rotation | TangoSupport_getAndroidColorCameraRotation () |
Returns the depth camera rotation in TangoSupport_Rotation format. More... | |
TangoSupport_Rotation | TangoSupport_getAndroidDepthCameraRotation () |
Returns the depth camera rotation in TangoSupport_Rotation format. More... | |
TangoErrorType | TangoSupport_getCameraIntrinsicsBasedOnDisplayRotation (TangoCameraId camera_id, TangoSupport_Rotation display_rotation, TangoCameraIntrinsics *intrinsics) |
Get the camera intrinsics based on the display rotation. This function will query the camera intrinsics and rotate them according to the display rotation. More... | |
TangoErrorType | TangoSupport_getTangoVersion (void *jni_env, void *activity, int *version) |
Get the version code of the installed TangoCore package. More... | |
TangoErrorType | TangoSupport_getVideoOverlayUVBasedOnDisplayRotation (const float uv_coordinates[8], TangoSupport_Rotation display_rotation, float output_uv_coordinates[8]) |
Get the video overlay UV coordinates based on the display rotation. Given the UV coordinates belonging to a display rotation that matches the camera rotation, this function will return the UV coordinates for any display rotation. More... | |
void | TangoSupport_initialize (TangoSupport_GetPoseAtTimeFn getPoseAtTime, TangoSupport_GetCameraIntrinsicsFn getCameraIntrinsics) |
Initialize the support library with function pointers required by the library. NOTE: This function must be called after the Android service has been bound. More... | |
bool | TangoSupport_isValidRotation (TangoSupport_Rotation rotation, bool allowIgnored) |
Indicates whether a given rotation is valid or not. More... | |
Functions that do not fit into any other group.
typedef TangoErrorType(* TangoSupport_GetCameraIntrinsicsFn) (TangoCameraId camera_id, TangoCameraIntrinsics *intrinsics) |
Typedef for getCameraIntrinsics function signature; required by the TangoSupport_initialize
method.
Definition at line 80 of file tango_support.h.
typedef TangoErrorType(* TangoSupport_GetPoseAtTimeFn) (double timestamp, TangoCoordinateFramePair frame, TangoPoseData *pose) |
Typedef for getPostAtTime function signature; required by the TangoSupport_initialize
method.
Definition at line 75 of file tango_support.h.
Display orientation. This is a relative orientation between default (natural) screen orientation and current screen orientation. The orientation is calculated based on a clockwise rotation.
The index number mirrors Android display rotation constant. This allows the developer to directly pass in the index value returned from Android.
Definition at line 42 of file tango_support.h.
TangoSupport_Rotation TangoSupport_getAndroidColorCameraRotation | ( | ) |
Returns the depth camera rotation in TangoSupport_Rotation format.
TangoSupport_Rotation TangoSupport_getAndroidDepthCameraRotation | ( | ) |
Returns the depth camera rotation in TangoSupport_Rotation format.
TangoErrorType TangoSupport_getCameraIntrinsicsBasedOnDisplayRotation | ( | TangoCameraId | camera_id, |
TangoSupport_Rotation | display_rotation, | ||
TangoCameraIntrinsics * | intrinsics | ||
) |
Get the camera intrinsics based on the display rotation. This function will query the camera intrinsics and rotate them according to the display rotation.
camera_id | The camera ID to retrieve the calibration intrinsics for. |
display_rotation | The index of the display rotation between display's default (natural) orientation and current orientation. |
intrinsics | A TangoCameraIntrinsics struct that must be allocated before calling, and is filled with camera intrinsics for the rotated camera camera_id upon successful return. |
TANGO_SUCCESS
on success, TANGO_ERROR
if the support library was not previously initialized, or TANGO_INVALID
on invalid input. TangoErrorType TangoSupport_getTangoVersion | ( | void * | jni_env, |
void * | activity, | ||
int * | version | ||
) |
Get the version code of the installed TangoCore package.
jni_env | A pointer to the JNI Context of the native activity. This must be of type JNIEnv*, and implicit type conversion should do the right thing without requiring a cast. |
activity | The native activity object handle of the calling native activity. This should be of type jobject, and implicit type conversion should do the right thing without requiring a cast. |
version | Filled out with the version of the installed TangoCore package or 0 if it is not installed. |
TANGO_SUCCESS
if the version was able to be successfully found. TANGO_ERROR
if some other error happened. TangoErrorType TangoSupport_getVideoOverlayUVBasedOnDisplayRotation | ( | const float | uv_coordinates[8], |
TangoSupport_Rotation | display_rotation, | ||
float | output_uv_coordinates[8] | ||
) |
Get the video overlay UV coordinates based on the display rotation. Given the UV coordinates belonging to a display rotation that matches the camera rotation, this function will return the UV coordinates for any display rotation.
uv_coordinates | The UV coordinates corresponding to a display rotation that matches the camera rotation. Cannot be NULL. |
display_rotation | The index of the display rotation between display's default (natural) orientation and current orientation. |
output_uv_coordinates | The UV coordinates for this rotation. |
TANGO_SUCCESS
on success, TANGO_ERROR
if the support library was not previously initialized, or TANGO_INVALID
on invalid input. void TangoSupport_initialize | ( | TangoSupport_GetPoseAtTimeFn | getPoseAtTime, |
TangoSupport_GetCameraIntrinsicsFn | getCameraIntrinsics | ||
) |
Initialize the support library with function pointers required by the library. NOTE: This function must be called after the Android service has been bound.
getPoseAtTime | The function to call to retrieve device pose information. In practice this is TangoService_getPoseAtTime, except for testing. |
getCameraIntrinsics | The function to call to retrieve camera intrinsics information. In practice this is TangoService_getCameraIntrinsics, except for testing. |
bool TangoSupport_isValidRotation | ( | TangoSupport_Rotation | rotation, |
bool | allowIgnored | ||
) |
Indicates whether a given rotation is valid or not.
rotation | The input rotation to be verified. |
allowIgnored | Allow TANGO_SUPPORT_ROTATION_IGNORED. |