APIs for texturing of 3D meshes.
More...
APIs for texturing of 3D meshes.
Extracts the textured mesh from the texturing context.
- Parameters
-
context | Handle to the texturing context. |
mesh | On successful return, a freshly allocated Tango3DR_Mesh containing the mesh for the grid cell. After use, free this by calling Tango3DR_Mesh_destroy(). |
- Returns
TANGO_3DR_SUCCESS
on success, TANGO_3DR_INVALID
if the parameters are not valid
Create a new Tango 3D texturing context and return a handle to it.
- Parameters
-
context_config | The context will be started with the setting specified by this config handle. If NULL is passed here, then the context will be started in the default configuration. |
tango_mesh | mesh that will be textured. |
- Returns
- A handle to the Tango texturing context.
Destroy a previously created texturing context.
- Parameters
-
context | Handle to a previously created context. |
- Returns
TANGO_3DR_SUCCESS
on successfully destroying the context. Returns TANGO_3DR_INVALID
if context is NULL.
Sets the color camera intrinsic calibration that a texturing context uses. It is required to call this function once before calling Tango3DR_updateTexture
and .
- Parameters
-
context | Handle to a texturing context. |
calibration | The calibration parameters of the color camera. |
- Returns
TANGO_3DR_SUCCESS
on success, if the parameters are not valid.
Updates the texturing context using an image with a corresponding pose. Must be called from the same thread where the context was created and destroyed.
- Parameters
-
context | Handle to the texturing context. |
image | Image used for texturing. Ideally, the image should be in TANGO_3DR_HAL_PIXEL_FORMAT_YCrCb_420_SP. Other formats (RGB_888/RGBA_8888) will be converted automatically. |
image_pose | Pose corresponding to the image. |
- Returns
TANGO_3DR_SUCCESS
on success and TANGO_3DR_INVALID
if the parameters are not valid.
Updates the texturing context using an image with a corresponding pose. Must be called from the same thread where the context was created and destroyed.
Additionally, a valid GL context supporting at least Desktop OpengGL 2.1 or OpenGL ES 2 must be current on the calling thread.
- Parameters
-
context | Handle to the texturing context. |
texture_target | Must be GL_TEXTURE_2D on Linux or Android, or GL_TEXTURE_EXTERNAL_OES on Android. |
image_texture_id | OpenGL ID of the current camera image texture. |
image_pose | Pose corresponding to the image. |
- Returns
TANGO_3DR_SUCCESS
on success and TANGO_3DR_INVALID
if the parameters are not valid.