Flutter Engine
The Flutter Engine
|
Typedefs | |
typedef struct ArPose_ | ArPose |
Functions | |
void | ArPose_create (const ArSession *session, const float *pose_raw, ArPose **out_pose) |
void | ArPose_destroy (ArPose *pose) |
Releases memory used by a pose object. More... | |
void | ArPose_getPoseRaw (const ArSession *session, const ArPose *pose, float *out_pose_raw) |
void | ArPose_getMatrix (const ArSession *session, const ArPose *pose, float *out_matrix_col_major_4x4) |
Represents an immutable rigid transformation from one coordinate space to another.
typedef struct ArPose_ ArPose |
A structured rigid transformation (value type).
Allocate with ArPose_create()
Release with ArPose_destroy()
Definition at line 175 of file arcore_c_api.h.
Allocates and initializes a new pose object. pose_raw
points to an array of 7 floats, describing the rotation (quaternion) and translation of the pose in the same order as the first 7 elements of the Android Sensor.TYPE_POSE_6DOF
values documented on SensorEvent.values()
The order of the values is: qx, qy, qz, qw, tx, ty, tz.
If pose_raw
is null, initializes with the identity pose.
void ArPose_destroy | ( | ArPose * | pose | ) |
Releases memory used by a pose object.
void ArPose_getMatrix | ( | const ArSession * | session, |
const ArPose * | pose, | ||
float * | out_matrix_col_major_4x4 | ||
) |
Converts a pose into a 4x4 transformation matrix.
[in] | session | The ARCore session |
[in] | pose | The pose to convert |
[out] | out_matrix_col_major_4x4 | Pointer to an array of 16 floats, to be filled with a column-major homogenous transformation matrix, as used by OpenGL. |
Extracts the quaternion rotation and translation from a pose object.
[in] | session | The ARCore session |
[in] | pose | The pose to extract |
[out] | out_pose_raw | Pointer to an array of 7 floats, to be filled with the quaternion rotation and translation as described in ArPose_create(). |