ArMesh
Represents a polygon mesh describing geometry.
Obtained by ArStreetscapeGeometry_acquireMesh
.
Summary
Typedefs |
|
---|---|
ArMesh
|
typedefstruct ArMesh_
A triangulated mesh representing a surface reconstruction of the scene. |
Functions |
|
---|---|
ArMesh_getIndexList(const ArSession *session, const ArMesh *mesh, const uint32_t **out_indices)
|
void
Retrieves the triangle data for this mesh in an array of length
ArMesh_getIndexListSize . |
ArMesh_getIndexListSize(const ArSession *session, const ArMesh *mesh, int32_t *out_num_indices)
|
void
Retrieves the number of triangle indices (represented by
ArMesh_getIndexList ) in this mesh. |
ArMesh_getVertexList(const ArSession *session, const ArMesh *mesh, const float **out_vertex_positions_xyz)
|
void
Retrieves the vertex coordinate data for this mesh.
|
ArMesh_getVertexListSize(const ArSession *session, const ArMesh *mesh, int32_t *out_num_vertices)
|
void
Retrieves the number of vertices in this mesh.
|
ArMesh_release(ArMesh *mesh)
|
void
Releases a reference to the Mesh.
|
Typedefs
ArMesh
struct ArMesh_ ArMesh
A triangulated mesh representing a surface reconstruction of the scene.
- Release with:
ArMesh_release
Functions
ArMesh_getIndexList
void ArMesh_getIndexList( const ArSession *session, const ArMesh *mesh, const uint32_t **out_indices )
Retrieves the triangle data for this mesh in an array of length ArMesh_getIndexListSize
.
Each face is a triplet of indices into the vertices array. The indices should always be used as a triangle list, with three indices per triangle. The result can be passed as the "indices" parameter to glDrawElements
or copied into a buffer bound via vkCmdBindIndexBuffer
.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArMesh_getIndexListSize
void ArMesh_getIndexListSize( const ArSession *session, const ArMesh *mesh, int32_t *out_num_indices )
Retrieves the number of triangle indices (represented by ArMesh_getIndexList
) in this mesh.
The indices should always be used as a triangle list, with three indices per triangle. The result can be passed as the indices
parameter to
glDrawElements
or copied into a buffer bound via
vkCmdDrawIndexed
.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArMesh_getVertexList
void ArMesh_getVertexList( const ArSession *session, const ArMesh *mesh, const float **out_vertex_positions_xyz )
Retrieves the vertex coordinate data for this mesh.
Each vertex is three float
values, stored in XYZ order. The total number of float
values in out_vertex_positions_xyz
is 3 * ArMesh_getVertexListSize
.
The array returned in out_vertex_positions_xyz
will only remain valid as long as mesh
is valid.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArMesh_getVertexListSize
void ArMesh_getVertexListSize( const ArSession *session, const ArMesh *mesh, int32_t *out_num_vertices )
Retrieves the number of vertices in this mesh.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArMesh_release
void ArMesh_release( ArMesh *mesh )
Releases a reference to the Mesh.
This must match a call to ArStreetscapeGeometry_acquireMesh
.
This function may safely be called with NULL
- it will do nothing.