Struct PlaneBoundaryCollection | Magic Leap XR Plugin | 6.0.0
docs.unity3d.com
    Show / Hide Table of Contents

    Struct PlaneBoundaryCollection

    Represents a collection of concave BoundedPlane boundaries obtained from .

    Namespace: UnityEngine.XR.MagicLeap
    Syntax
    public struct PlaneBoundaryCollection : IEquatable<PlaneBoundaryCollection>
    Remarks

    Each Magic Leap plane can have multiple plane boundaries. This collection represents the set of all boundaries associated with a particular plane. Note that unlike most boundaries associated with BoundedPlanes, these are not necessarily convex.

    The plane boundaries are tied to native resources which are managed by the MagicLeapPlaneSubsystem. Typically, a PlaneBoundaryCollection is only valid until the next call to , so you should not hold onto an instance of this struct past a frame boundary.

    Properties

    count

    The number of boundaries in this collection.

    Declaration
    public int count { get; }
    Property Value
    Type Description
    Int32

    Item[Int32]

    Attempts to get the plane boundary at index and, if successful, copies it to boundaryOut. boundaryOut is resized or created using if necessary.

    Declaration
    public PlaneBoundary this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index

    The index of the boundary to retrieve.

    Property Value
    Type Description
    PlaneBoundary

    true if the boundary was successfully retrieved and boundaryOut was populated; otherwise, false.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if valid is false.

    InvalidOperationException

    Thrown if allocator is Allocator.Temp or Allocator.None.

    ArgumentOutOfRangeException

    Thrown if index is less than zero or greater than or equal to count.

    valid

    Whether this collection is valid or not. Check for validity before using the index operator.

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    Boolean

    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
    Boolean

    true if obj is of type PlaneBoundaryCollection and compares equal with Equals(PlaneBoundaryCollection).

    Overrides
    ValueType.Equals(Object)

    Equals(PlaneBoundaryCollection)

    IEquatable interface. Comapres for equality.

    Declaration
    public bool Equals(PlaneBoundaryCollection other)
    Parameters
    Type Name Description
    PlaneBoundaryCollection other

    The PlaneBoundaryCollection to compare against.

    Returns
    Type Description
    Boolean

    true if all fields of this PlaneBoundaryCollection compare equal to other.

    GetEnumerator()

    Get an enumerator, compatible with a duck-typed foreach. You typically would not call this directly, but is used by the compiler in a foreach statement.

    Declaration
    public PlaneBoundaryCollection.Enumerator GetEnumerator()
    Returns
    Type Description
    PlaneBoundaryCollection.Enumerator

    An Enumerator compatible with a duck-typed foreach.

    GetHashCode()

    Computes a hash code suitable for use in a Dictionary or HashSet.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code suitable for use in a Dictionary or HashSet.

    Overrides
    ValueType.GetHashCode()

    Operators

    Equality(PlaneBoundaryCollection, PlaneBoundaryCollection)

    Comapres for equality. Same as Equals(PlaneBoundaryCollection).

    Declaration
    public static bool operator ==(PlaneBoundaryCollection lhs, PlaneBoundaryCollection rhs)
    Parameters
    Type Name Description
    PlaneBoundaryCollection lhs

    The left-hand side of the comparison.

    PlaneBoundaryCollection rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    true if all fields of this PlaneBoundaryCollection compare equal to other.

    Inequality(PlaneBoundaryCollection, PlaneBoundaryCollection)

    Comapres for inequality. Same as !Equals(PlaneBoundaryCollection).

    Declaration
    public static bool operator !=(PlaneBoundaryCollection lhs, PlaneBoundaryCollection rhs)
    Parameters
    Type Name Description
    PlaneBoundaryCollection lhs

    The left-hand side of the comparison.

    PlaneBoundaryCollection rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    true if any of the fields of this PlaneBoundaryCollection are not equal to other.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023