Flutter Engine
The Flutter Engine
|
Typedefs | |
typedef struct ArPlane_ | ArPlane |
Functions | |
AR_DEFINE_ENUM (ArPlaneType) | |
void | ArPlane_acquireSubsumedBy (const ArSession *session, const ArPlane *plane, ArPlane **out_subsumed_by) |
void | ArPlane_getType (const ArSession *session, const ArPlane *plane, ArPlaneType *out_plane_type) |
Retrieves the type (orientation) of the plane. See ::ArPlaneType. More... | |
void | ArPlane_getCenterPose (const ArSession *session, const ArPlane *plane, ArPose *out_pose) |
void | ArPlane_getExtentX (const ArSession *session, const ArPlane *plane, float *out_extent_x) |
void | ArPlane_getExtentZ (const ArSession *session, const ArPlane *plane, float *out_extent_z) |
void | ArPlane_getPolygonSize (const ArSession *session, const ArPlane *plane, int32_t *out_polygon_size) |
void | ArPlane_getPolygon (const ArSession *session, const ArPlane *plane, float *out_polygon_xz) |
void | ArPlane_isPoseInExtents (const ArSession *session, const ArPlane *plane, const ArPose *pose, int32_t *out_pose_in_extents) |
void | ArPlane_isPoseInPolygon (const ArSession *session, const ArPlane *plane, const ArPose *pose, int32_t *out_pose_in_polygon) |
Describes the current best knowledge of a real-world planar surface.
typedef struct ArPlane_ ArPlane |
A detected planar surface (reference type, long-lived).
Trackable type: #AR_TRACKABLE_PLANE
Release with: ArTrackable_release()
Definition at line 284 of file arcore_c_api.h.
AR_DEFINE_ENUM | ( | ArPlaneType | ) |
Simple summary of the normal vector of a plane, for filtering purposes.
A horizontal plane facing upward (for example a floor or tabletop).
A horizontal plane facing downward (for example a ceiling).
A vertical plane (for example a wall).
Definition at line 742 of file arcore_c_api.h.
void ArPlane_acquireSubsumedBy | ( | const ArSession * | session, |
const ArPlane * | plane, | ||
ArPlane ** | out_subsumed_by | ||
) |
Acquires a reference to the plane subsuming this plane.
Two or more planes may be automatically merged into a single parent plane, resulting in this method acquiring the parent plane when called with each child plane. A subsumed plane becomes identical to the parent plane, and will continue behaving as if it were independently tracked, for example being included in the output of ArFrame_getUpdatedTrackables().
In cases where a subsuming plane is itself subsumed, this function will always return the topmost non-subsumed plane.
Note: this function will set *out_subsumed_by
to NULL if the plane is not subsumed.
Returns the pose of the center of the detected plane. The pose's transformed +Y axis will be point normal out of the plane, with the +X and +Z axes orienting the extents of the bounding rectangle.
[in] | session | The ARCore session. |
[in] | plane | The plane for which to retrieve center pose. |
[in,out] | out_pose | An already-allocated ArPose object into which the pose will be stored. |
Retrieves the length of this plane's bounding rectangle measured along the local X-axis of the coordinate space defined by the output of ArPlane_getCenterPose().
Retrieves the length of this plane's bounding rectangle measured along the local Z-axis of the coordinate space defined by the output of ArPlane_getCenterPose().
void ArPlane_getPolygon | ( | const ArSession * | session, |
const ArPlane * | plane, | ||
float * | out_polygon_xz | ||
) |
Returns the 2D vertices of a convex polygon approximating the detected plane, in the form [x1, z1, x2, z2, ...]
. These X-Z values are in the plane's local x-z plane (y=0) and must be transformed by the pose (ArPlane_getCenterPose()) to get the boundary in world coordinates.
[in] | session | The ARCore session. |
[in] | plane | The plane to retrieve the polygon from. |
[in,out] | out_polygon_xz | A pointer to an array of floats. The length of this array must be at least that reported by ArPlane_getPolygonSize(). |
void ArPlane_getPolygonSize | ( | const ArSession * | session, |
const ArPlane * | plane, | ||
int32_t * | out_polygon_size | ||
) |
Retrieves the number of elements (not vertices) in the boundary polygon. The number of vertices is 1/2 this size.
void ArPlane_getType | ( | const ArSession * | session, |
const ArPlane * | plane, | ||
ArPlaneType * | out_plane_type | ||
) |
Retrieves the type (orientation) of the plane. See ::ArPlaneType.
void ArPlane_isPoseInExtents | ( | const ArSession * | session, |
const ArPlane * | plane, | ||
const ArPose * | pose, | ||
int32_t * | out_pose_in_extents | ||
) |
Sets *out_pose_in_extents
to non-zero if the given pose (usually obtained from a HitResult) is in the plane's rectangular extents.