Struct ARKitFocus
Read-only struct that stores lens position value of camera focus.
Implements
Inherited Members
Namespace: UnityEngine.XR.ARKit
Assembly: Unity.XR.ARKit.dll
Syntax
public struct ARKitFocus : IEquatable<ARKitFocus>
Constructors
ARKitFocus(float)
Constructs an instance with given lens position value.
Declaration
public ARKitFocus(float lensPosition)
Parameters
Type | Name | Description |
---|---|---|
float | lensPosition | The lens position value, between 0 and 1. Refer to lensPosition for more information. |
Properties
lensPosition
The lens position value. The value doesn't correspond to an exact physical distance of the lens. The range of possible positions is 0.0 to 1.0, with 0.0 being the shortest distance at which the lens can focus and 1.0 the furthest. Note that 1.0 doesn't represent focus at infinity.
Declaration
public float lensPosition { get; }
Property Value
Type | Description |
---|---|
float |
Methods
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An object to compare against. |
Returns
Type | Description |
---|---|
bool | Returns true if |
Overrides
Equals(ARKitFocus)
Tests for equality.
Declaration
public bool Equals(ARKitFocus other)
Parameters
Type | Name | Description |
---|---|---|
ARKitFocus | other | The ARKitFocus to compare against. |
Returns
Type | Description |
---|---|
bool |
Remarks
Two ARKitFocuss are considered equal if their lens position value is equal.
GetHashCode()
Generates a hash code suitable for use with a HashSet
or Dictionary
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Returns a hash code for this ARKitFocus. |
Overrides
ToString()
Generates a string representation of this ARKitFocus suitable for debugging purposes.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of this ARKitFocus. |
Overrides
Operators
operator ==(ARKitFocus, ARKitFocus)
Tests for equality. Same as Equals(ARKitFocus).
Declaration
public static bool operator ==(ARKitFocus lhs, ARKitFocus rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitFocus | lhs | The ARKitFocus to compare with |
ARKitFocus | rhs | The ARKitFocus to compare with |
Returns
Type | Description |
---|---|
bool | true if |
operator !=(ARKitFocus, ARKitFocus)
Tests for inequality. Same as the negation of Equals(ARKitFocus).
Declaration
public static bool operator !=(ARKitFocus lhs, ARKitFocus rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitFocus | lhs | The ARKitFocus to compare with |
ARKitFocus | rhs | The ARKitFocus to compare with |
Returns
Type | Description |
---|---|
bool | false if |