Struct XROcclusionFrame
Represents a frame captured by the device camera with included metadata.
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: Unity.XR.ARSubsystems.dll
Syntax
public struct XROcclusionFrame : IEquatable<XROcclusionFrame>, IDisposable
Constructors
XROcclusionFrame(XROcclusionFrameProperties, long, XRNearFarPlanes, NativeArray<Pose>, NativeArray<XRFov>)
Constructor.
Declaration
public XROcclusionFrame(XROcclusionFrameProperties properties, long timestamp, XRNearFarPlanes nearFarPlanes, NativeArray<Pose> poses, NativeArray<XRFov> fovs)
Parameters
Type | Name | Description |
---|---|---|
XROcclusionFrameProperties | properties | The properties that are included in the frame. |
long | timestamp | The timestamp of the frame, in nanoseconds. |
XRNearFarPlanes | nearFarPlanes | The near and far planes. |
NativeArray<Pose> | poses | The poses from which the frame was rendered. |
NativeArray<XRFov> | fovs | The fields of view for the frame. |
Properties
properties
The properties that are included in the frame.
Declaration
public XROcclusionFrameProperties properties { get; }
Property Value
Type | Description |
---|---|
XROcclusionFrameProperties | The included properties. |
Methods
Dispose()
Dispose native resources associated with this frame, including the native array of display matrices.
Declaration
public void Dispose()
Equals(object)
Compares for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
Equals(XROcclusionFrame)
Compares for equality.
Declaration
public bool Equals(XROcclusionFrame other)
Parameters
Type | Name | Description |
---|---|---|
XROcclusionFrame | other | The other XROcclusionFrame to compare against. |
Returns
Type | Description |
---|---|
bool | true if the XROcclusionFrame represents the same object. Otherwise, false. |
GetHashCode()
Generates a hash code suitable for use in HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash of this XROcclusionFrame. |
Overrides
ToString()
Generates a string representation of this instance suitable for debugging purposes.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string. |
Overrides
TryGetFovs(out NativeArray<XRFov>)
Get an array of fields of view for the frame if possible.
Declaration
public bool TryGetFovs(out NativeArray<XRFov> fovs)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<XRFov> | fovs | The output array of fields of view, if this method returns true. |
Returns
Type | Description |
---|---|
bool | true if the frame has fields of view that were output to |
TryGetNearFarPlanes(out XRNearFarPlanes)
Get the near and far planes for the frame, if possible.
Declaration
public bool TryGetNearFarPlanes(out XRNearFarPlanes nearFarPlanes)
Parameters
Type | Name | Description |
---|---|---|
XRNearFarPlanes | nearFarPlanes | The near and far planes, if this method returns true. |
Returns
Type | Description |
---|---|
bool | true if the frame has near and far planes that were output to |
TryGetPoses(out NativeArray<Pose>)
Get an array of poses from which the frame was rendered, if possible.
Declaration
public bool TryGetPoses(out NativeArray<Pose> poses)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<Pose> | poses | The output array of poses, if this method returns true. |
Returns
Type | Description |
---|---|
bool | true if the frame has poses that were output to |
TryGetTimestamp(out long)
Get the timestamp of the frame, if possible.
Declaration
public bool TryGetTimestamp(out long timestampNs)
Parameters
Type | Name | Description |
---|---|---|
long | timestampNs | The timestamp of the camera frame, in nanoseconds. |
Returns
Type | Description |
---|---|
bool | true if the frame has a timestamp that was output to |
Operators
operator ==(XROcclusionFrame, XROcclusionFrame)
Compares lhs
and rhs
for equality using Equals(XROcclusionFrame).
Declaration
public static bool operator ==(XROcclusionFrame lhs, XROcclusionFrame rhs)
Parameters
Type | Name | Description |
---|---|---|
XROcclusionFrame | lhs | The left-hand-side XROcclusionFrame of the comparison. |
XROcclusionFrame | rhs | The right-hand-side XROcclusionFrame of the comparison. |
Returns
Type | Description |
---|---|
bool |
operator !=(XROcclusionFrame, XROcclusionFrame)
Compares lhs
and rhs
for inequality using Equals(XROcclusionFrame).
Declaration
public static bool operator !=(XROcclusionFrame lhs, XROcclusionFrame rhs)
Parameters
Type | Name | Description |
---|---|---|
XROcclusionFrame | lhs | The left-hand-side XROcclusionFrame of the comparison. |
XROcclusionFrame | rhs | The right-hand-side XROcclusionFrame of the comparison. |
Returns
Type | Description |
---|---|
bool |