Struct AsyncRaycastResult
Represents a Magic Leap asynchronous raycast result. The result must be created using
Async
Implements
Inherited Members
Namespace: UnityEngine .XR.MagicLeap
Assembly: UnityEngine.XR.MagicLeap.dll
Syntax
public struct AsyncRaycastResult : IEquatable<AsyncRaycastResult>
Properties
confidence
The confidence of the result in the range 0..1, where 0 indicates low confidence and 1 is high confidence.
Declaration
public readonly float confidence { get; }
Property Value
Type | Description |
---|---|
float |
pose
The pose of the raycast. The normal of the surface that was hit can be computed with pose.up
.
Only valid if state is Success
Declaration
public readonly Pose pose { get; }
Property Value
Type | Description |
---|---|
Pose |
state
The state of the raycasts, e.g. whether it was successful, pending, or incountered an error.
If the state is anything other than
Success
Declaration
public RaycastResultState state { get; }
Property Value
Type | Description |
---|---|
Raycast |
Methods
Equals(object)
IEquatable interface. Compares for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare for equality. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(AsyncRaycastResult)
IEquatable interface. Comapres for equality.
Declaration
public bool Equals(AsyncRaycastResult other)
Parameters
Type | Name | Description |
---|---|---|
Async |
other | The Async |
Returns
Type | Description |
---|---|
bool |
|
GetHashCode()
Computes a hash code suitable for use in a Dictionary
or HashSet
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code suitable for use in a |
Overrides
ToString()
Generates a string representation of the raycast result of the form "{state}: pose {pose} with confidence {confidence}"
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of the raycast result of the form "{state}: pose {pose} with confidence {confidence}" |
Overrides
Operators
operator ==(AsyncRaycastResult, AsyncRaycastResult)
Comapres for equality. Same as Equals(Async
Declaration
public static bool operator ==(AsyncRaycastResult lhs, AsyncRaycastResult rhs)
Parameters
Type | Name | Description |
---|---|---|
Async |
lhs | The left-hand side of the comparison. |
Async |
rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(AsyncRaycastResult, AsyncRaycastResult)
Comapres for inequality. Same as !
Equals(Async
Declaration
public static bool operator !=(AsyncRaycastResult lhs, AsyncRaycastResult rhs)
Parameters
Type | Name | Description |
---|---|---|
Async |
lhs | The left-hand side of the comparison. |
Async |
rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|