GoogleARCore. Frame
Provides a snapshot of the state of ARCore at a specific timestamp associated with the current frame.
Summary
Frame holds information about ARCore's state including the pose of the camera relative to the world, estimated lighting parameters, and information on updates to objects (like Planes or Point Clouds) that ARCore is tracking.
Properties |
|
---|---|
LightEstimate
|
static LightEstimate
Gets the current light estimate for this frame.
|
Pose
|
static Pose
Gets the pose of the ARCore device for the frame in Unity world coordinates.
|
Public static functions |
|
---|---|
Raycast(float x, float y, TrackableHitFlags filter, out TrackableHit hitResult)
|
bool
Performs a raycast against objects being tracked by ARCore.
|
Raycast(Vector3 origin, Vector3 direction, out TrackableHit hitResult, float maxDistance, TrackableHitFlags filter)
|
bool
Performs a raycast against objects being tracked by ARCore.
|
RaycastAll(float x, float y, TrackableHitFlags filter, List< TrackableHit > hitResults)
|
bool
Performs a raycast against objects being tracked by ARCore.
|
RaycastAll(Vector3 origin, Vector3 direction, List< TrackableHit > hitResults, float maxDistance, TrackableHitFlags filter)
|
bool
Performs a raycast against objects being tracked by ARCore.
|
RaycastInstantPlacement(float x, float y, float approximateDistanceMeters, out TrackableHit hitResult)
|
bool
Performs a ray cast that can return a result before ARCore establishes full tracking.
|
Classes |
|
---|---|
GoogleARCore. |
Container for state related to the ARCore camera for the frame. |
GoogleARCore. |
Container for state related to the ARCore camera image metadata for the frame. |
GoogleARCore. |
Container for state related to the ARCore point cloud for the frame. |
Properties
Pose
static Pose Pose
Gets the pose of the ARCore device for the frame in Unity world coordinates.
Public static functions
Raycast
bool Raycast( float x, float y, TrackableHitFlags filter, out TrackableHit hitResult )
Performs a raycast against objects being tracked by ARCore.
Output the closest hit from the camera. Note that the Unity's screen coordinate (0, 0) starts from bottom left.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
true if the raycast had a hit, otherwise false . |
Raycast
bool Raycast( Vector3 origin, Vector3 direction, out TrackableHit hitResult, float maxDistance, TrackableHitFlags filter )
Performs a raycast against objects being tracked by ARCore.
Output the closest hit from the origin.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Returns |
true if the raycast had a hit, otherwise false . |
RaycastAll
bool RaycastAll( float x, float y, TrackableHitFlags filter, List< TrackableHit > hitResults )
Performs a raycast against objects being tracked by ARCore.
Output all hits from the camera. Note that the Unity's screen coordinate (0, 0) starts from bottom left.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
true if the raycast had a hit, otherwise false . |
RaycastAll
bool RaycastAll( Vector3 origin, Vector3 direction, List< TrackableHit > hitResults, float maxDistance, TrackableHitFlags filter )
Performs a raycast against objects being tracked by ARCore.
Output all hits from the origin.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Returns |
true if the raycast had a hit, otherwise false . |
RaycastInstantPlacement
bool RaycastInstantPlacement( float x, float y, float approximateDistanceMeters, out TrackableHit hitResult )
Performs a ray cast that can return a result before ARCore establishes full tracking.
The pose and apparent scale of attached objects depends on the InstantPlacementPoint tracking method and the provided approximateDistanceMeters. A discussion of the different tracking methods and the effects of apparent object scale are described in InstantPlacementPoint
.
This function will succeed only if InstantPlacementMode
is InstantPlacementMode.LocalYUp
in the ARCore session configuration, the ARCore session status is SessionStatus
.Tracking
, and there are sufficient feature points to track the point in screen space.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
true if successful, otherwise false . |