ArTrackable
Something that can be tracked and that anchors can be attached to.
Summary
Enumerations |
|
---|---|
ArTrackableType{
|
enum Object types for heterogeneous query/update lists. |
Typedefs |
|
---|---|
ArTrackable
|
typedefstruct ArTrackable_
Trackable base type (reference type, long-lived). |
ArTrackableList
|
typedefstruct ArTrackableList_
A list of ArTrackable's (value type). |
Functions |
|
---|---|
ArTrackableList_acquireItem(const ArSession *session, const ArTrackableList *trackable_list, int32_t index, ArTrackable **out_trackable)
|
void
Acquires a reference to an indexed entry in the list.
|
ArTrackableList_create(const ArSession *session, ArTrackableList **out_trackable_list)
|
void
Creates a trackable list object.
|
ArTrackableList_destroy(ArTrackableList *trackable_list)
|
void
Releases the memory used by a trackable list object, along with all the anchor references it holds.
|
ArTrackableList_getSize(const ArSession *session, const ArTrackableList *trackable_list, int32_t *out_size)
|
void
Retrieves the number of trackables in this list.
|
ArTrackable_acquireNewAnchor(ArSession *session, ArTrackable *trackable, ArPose *pose, ArAnchor **out_anchor)
|
Creates an Anchor at the given pose in the world coordinate space, attached to this Trackable, and acquires a reference to it.
|
ArTrackable_getAnchors(const ArSession *session, const ArTrackable *trackable, ArAnchorList *out_anchor_list)
|
void
Gets the set of anchors attached to this trackable.
|
ArTrackable_getTrackingState(const ArSession *session, const ArTrackable *trackable, ArTrackingState *out_tracking_state)
|
void
Retrieves the current state of ARCore's knowledge of the pose of this trackable.
|
ArTrackable_getType(const ArSession *session, const ArTrackable *trackable, ArTrackableType *out_trackable_type)
|
void
Retrieves the type of the trackable.
|
ArTrackable_release(ArTrackable *trackable)
|
void
Releases a reference to a trackable.
|
Enumerations
ArTrackableType
ArTrackableType
Object types for heterogeneous query/update lists.
Properties | |
---|---|
AR_TRACKABLE_AUGMENTED_IMAGE
|
The |
AR_TRACKABLE_BASE_TRACKABLE
|
The base Trackable type. Can be passed to |
AR_TRACKABLE_DEPTH_POINT
|
On supported devices, trackable type for depth image based hit results returned by |
AR_TRACKABLE_EARTH
|
Trackable type for |
AR_TRACKABLE_FACE
|
Trackable type for faces. |
AR_TRACKABLE_INSTANT_PLACEMENT_POINT
|
Trackable type for results retrieved from This trackable type is only available when when |
AR_TRACKABLE_NOT_VALID
|
An invalid Trackable type. |
AR_TRACKABLE_PLANE
|
The |
AR_TRACKABLE_POINT
|
The |
AR_TRACKABLE_STREETSCAPE_GEOMETRY
|
Trackable type for Streetscape Geometry. |
Typedefs
ArTrackableList
struct ArTrackableList_ ArTrackableList
A list of ArTrackable's
(value type).
- Create with:
ArTrackableList_create
- Release with:
ArTrackableList_destroy
Functions
ArTrackableList_acquireItem
void ArTrackableList_acquireItem( const ArSession *session, const ArTrackableList *trackable_list, int32_t index, ArTrackable **out_trackable )
Acquires a reference to an indexed entry in the list.
This call must eventually be matched with a call to ArTrackable_release
.
ArTrackableList_create
void ArTrackableList_create( const ArSession *session, ArTrackableList **out_trackable_list )
Creates a trackable list object.
ArTrackableList_destroy
void ArTrackableList_destroy( ArTrackableList *trackable_list )
Releases the memory used by a trackable list object, along with all the anchor references it holds.
ArTrackableList_getSize
void ArTrackableList_getSize( const ArSession *session, const ArTrackableList *trackable_list, int32_t *out_size )
Retrieves the number of trackables in this list.
ArTrackable_acquireNewAnchor
ArStatus ArTrackable_acquireNewAnchor( ArSession *session, ArTrackable *trackable, ArPose *pose, ArAnchor **out_anchor )
Creates an Anchor at the given pose in the world coordinate space, attached to this Trackable, and acquires a reference to it.
The type of Trackable will determine the semantics of attachment and how the Anchor's pose will be updated to maintain this relationship. Note that the relative offset between the pose of multiple Anchors attached to a Trackable may adjust slightly over time as ARCore updates its model of the world.
Details | |
---|---|
Returns |
AR_SUCCESS or any of:
|
ArTrackable_getAnchors
void ArTrackable_getAnchors( const ArSession *session, const ArTrackable *trackable, ArAnchorList *out_anchor_list )
Gets the set of anchors attached to this trackable.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
ArTrackable_getTrackingState
void ArTrackable_getTrackingState( const ArSession *session, const ArTrackable *trackable, ArTrackingState *out_tracking_state )
Retrieves the current state of ARCore's knowledge of the pose of this trackable.
Note: Starting in ARCore 1.12, changing the active camera config using ArSession_setCameraConfig
may cause the tracking state on certain devices to become permanently AR_TRACKING_STATE_PAUSED
. For consistent behavior across all supported devices, release any previously created trackables when setting a new camera config.
ArTrackable_getType
void ArTrackable_getType( const ArSession *session, const ArTrackable *trackable, ArTrackableType *out_trackable_type )
Retrieves the type of the trackable.
See ArTrackableType
for valid types.
ArTrackable_release
void ArTrackable_release( ArTrackable *trackable )
Releases a reference to a trackable.
This does not mean that the trackable will necessarily stop tracking. The same trackable may still be included in from other calls, for example ArSession_getAllTrackables
.
This function may safely be called with NULL
- it will do nothing.