GARAugmentedFaceMesh

Object that holds face mesh and transform data for a detected face.

Summary

Inheritance

Inherits from: NSObject

Properties

normals
const simd_float3 *
A buffer of 3D normals in (x, y, z) packing.
textureCoordinates
const simd_float2 *
A float buffer of UV texture coordinates in (u, v) packing.
triangleCount
NSUInteger
Number of triangles in the face mesh.
triangleIndices
const uint16_t *
A buffer of triangles' indices in consecutive (i0, i1, i2) triplets.
vertexCount
NSUInteger
Number of vertices in the Augmented Faces mesh.
vertices
const simd_float3 *
A float buffer of 3D vertex locations in (x, y, z) packing.

Properties

normals

@property(nonatomic, readonly) const simd_float3 *normals;

A buffer of 3D normals in (x, y, z) packing.

Each (x, y, z) is a unit vector of the normal to the surface at each vertex. There is exactly one normal vector for each vertex. These normals are relative to center transform of the face.

textureCoordinates

@property(nonatomic, readonly) const simd_float2 *textureCoordinates;

A float buffer of UV texture coordinates in (u, v) packing.

There is a pair of texture coordinates for each vertex. The textureCoordinates will not change.

triangleCount

@property(nonatomic, readonly) NSUInteger triangleCount;

Number of triangles in the face mesh.

This is equivalent to the number of elements in triangleIndices divided by 3. The count will not change.

triangleIndices

@property(nonatomic, readonly) const uint16_t *triangleIndices;

A buffer of triangles' indices in consecutive (i0, i1, i2) triplets.

Every three consecutive values are indices that represent a triangle. The front face of each triangle is defined by the face where the vertices are in counter clockwise winding order.

The triangleIndices will not change.

vertexCount

@property(nonatomic, readonly) NSUInteger vertexCount;

Number of vertices in the Augmented Faces mesh.

The vertexCount will not change. Currently, there are 468 vertices, although this might change in the future.

vertices

@property(nonatomic, readonly) const simd_float3 *vertices;

A float buffer of 3D vertex locations in (x, y, z) packing.

These vertices are relative to the center transform of the face. Units are in meters.