Typedefs | Enumerations | Functions
Miscellaneous Utility Functions

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.
typedef TangoErrorType(* TangoSupport_GetPoseAtTimeFn )(double timestamp, TangoCoordinateFramePair frame, TangoPoseData *pose)
 Typedef for getPostAtTime function signature; required by the TangoSupport_initialize method.

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.
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.
TangoErrorType TangoSupport_getTangoVersion (void *jni_env, void *activity, int *version)
 Get the version code of the installed TangoCore package.
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.
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.
bool TangoSupport_isValidRotation (TangoSupport_Rotation rotation, bool allowIgnored)
 Indicates whether a given rotation is valid or not.

Detailed Description

Functions that do not fit into any other group.


Typedef Documentation

Typedef for getCameraIntrinsics function signature; required by the TangoSupport_initialize method.

Definition at line 80 of file tango_support.h.

Typedef for getPostAtTime function signature; required by the TangoSupport_initialize method.

Definition at line 75 of file tango_support.h.


Enumeration Type Documentation

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.

Enumerator:
TANGO_SUPPORT_ROTATION_IGNORED 

Not apply any rotation.

TANGO_SUPPORT_ROTATION_0 

0 degree rotation (natural orientation)

TANGO_SUPPORT_ROTATION_90 

90 degree rotation.

TANGO_SUPPORT_ROTATION_180 

180 degree rotation.

TANGO_SUPPORT_ROTATION_270 

270 degree rotation.

Definition at line 42 of file tango_support.h.


Function Documentation

Returns the depth camera rotation in TangoSupport_Rotation format.

Returns:
Color camera rotation.

Returns the depth camera rotation in TangoSupport_Rotation format.

Returns:
Depth camera rotation.

Get the camera intrinsics based on the display rotation. This function will query the camera intrinsics and rotate them according to the display rotation.

Parameters:
camera_idThe camera ID to retrieve the calibration intrinsics for.
display_rotationThe index of the display rotation between display's default (natural) orientation and current orientation.
intrinsicsA TangoCameraIntrinsics struct that must be allocated before calling, and is filled with camera intrinsics for the rotated camera camera_id upon successful return.
Returns:
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.

Parameters:
jni_envA 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.
activityThe 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.
versionFilled out with the version of the installed TangoCore package or 0 if it is not installed.
Returns:
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.

Parameters:
uv_coordinatesThe UV coordinates corresponding to a display rotation that matches the camera rotation. Cannot be NULL.
display_rotationThe index of the display rotation between display's default (natural) orientation and current orientation.
output_uv_coordinatesThe UV coordinates for this rotation.
Returns:
TANGO_SUCCESS on success, TANGO_ERROR if the support library was not previously initialized, or TANGO_INVALID on invalid input.

Initialize the support library with function pointers required by the library. NOTE: This function must be called after the Android service has been bound.

Parameters:
getPoseAtTimeThe function to call to retrieve device pose information. In practice this is TangoService_getPoseAtTime, except for testing.
getCameraIntrinsicsThe 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.

Parameters:
rotationThe input rotation to be verified.
allowIgnoredAllow TANGO_SUPPORT_ROTATION_IGNORED.
Returns:
True if the given rotation is valid, false if it is not.


tango_support
Author(s):
autogenerated on Thu Jun 6 2019 19:49:51