docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct DoubleBounds

    Represents an axis aligned bounding box with values stored as doubles.

    Implements
    IEquatable<DoubleBounds>
    IFormattable
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Cloud.HighPrecision.Runtime
    Assembly: solution.dll
    Syntax
    [BurstCompile(CompileSynchronously = true)]
    [Serializable]
    public readonly struct DoubleBounds : IEquatable<DoubleBounds>, IFormattable

    Properties

    Center

    The center of the bounding box.

    Declaration
    public double3 Center { get; }
    Property Value
    Type Description
    double3

    Extents

    Distance between the center and the edges of the bounds.

    Declaration
    public double3 Extents { get; }
    Property Value
    Type Description
    double3

    Max

    The maximal point of the box. This is always equal to center+extents.

    Declaration
    public double3 Max { get; }
    Property Value
    Type Description
    double3

    Min

    The minimal point of the box. This is always equal to center-extents.

    Declaration
    public double3 Min { get; }
    Property Value
    Type Description
    double3

    Size

    The total size of the box. This is always twice as large as the extents.

    Declaration
    public double3 Size { get; }
    Property Value
    Type Description
    double3

    Methods

    Equals(object)

    Validate obj is a DoubleBounds instance and have the same values as this instance.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    Compare the values with this instance.

    Returns
    Type Description
    bool

    true if both instance have the same values; false otherwise.

    Overrides
    ValueType.Equals(object)

    Equals(DoubleBounds)

    Validate an other DoubleBounds has the same values as this instance.

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

    Compare the values with this instance.

    Returns
    Type Description
    bool

    true if both instances have the same values; false otherwise.

    GetHashCode()

    Compute a hash code for the object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()
    Remarks
    • You should not assume that equal hash codes imply object equality.
    • You should never persist or use a hash code outside the application domain in which it was created, because the same object may hash differently across application domains, processes, and platforms.

    ToString()

    Returns a formatted string for the bounds.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The formatted string representing this instance.

    Overrides
    ValueType.ToString()

    ToString(string)

    Returns a formatted string for the bounds.

    Declaration
    public string ToString(string format)
    Parameters
    Type Name Description
    string format

    A numeric format string.

    Returns
    Type Description
    string

    The formatted string representing this instance.

    ToString(string, IFormatProvider)

    Returns a formatted string for the bounds.

    Declaration
    public string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    string format

    A numeric format string.

    IFormatProvider formatProvider

    An object that specifies culture-specific formatting.

    Returns
    Type Description
    string

    The formatted string representing this instance.

    Operators

    operator ==(DoubleBounds, DoubleBounds)

    Validate both DoubleBounds have the same values.

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

    First instance to compare with.

    DoubleBounds rhs

    Compare lhs with this instance.

    Returns
    Type Description
    bool

    true if both instance have the same values; false otherwise.

    explicit operator Bounds(DoubleBounds)

    Convert a DoubleBounds instance to a new single precision Unity Bounds instance.

    Declaration
    public static explicit operator Bounds(DoubleBounds bounds)
    Parameters
    Type Name Description
    DoubleBounds bounds

    The instance to convert.

    Returns
    Type Description
    Bounds

    A new Bounds instance.

    explicit operator DoubleBounds(Bounds)

    Convert a single precision Unity Bounds instance to a new DoubleBounds instance.

    Declaration
    public static explicit operator DoubleBounds(Bounds bounds)
    Parameters
    Type Name Description
    Bounds bounds

    The instance to convert.

    Returns
    Type Description
    DoubleBounds

    A new DoubleBounds instance.

    operator !=(DoubleBounds, DoubleBounds)

    Validate both DoubleBounds have the different values.

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

    First instance to compare with.

    DoubleBounds rhs

    Compare lhs with this instance.

    Returns
    Type Description
    bool

    true if at least one value is different on both instances; false if both instance have the same values.

    Implements

    IEquatable<T>
    IFormattable
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)