Search Results for

    Show / Hide Table of Contents

    Struct Box

    A box shape.

    Implements
    System.IEquatable<Box>
    Inherited Members
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: ProjectDawn.Geometry3D
    Assembly: ProjectDawn.Geometry.dll
    Syntax
    [Serializable]
    public struct Box : IEquatable<Box>

    Constructors

    | Improve this Doc View Source

    Box(float3, float3)

    Declaration
    public Box(float3 position, float3 size)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 position
    Unity.Mathematics.float3 size

    Fields

    | Improve this Doc View Source

    Position

    The minimum point of box.

    Declaration
    public float3 Position
    Field Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Size

    The size of the box.

    Declaration
    public float3 Size
    Field Value
    Type Description
    Unity.Mathematics.float3

    Properties

    | Improve this Doc View Source

    Area

    Returns area of the box.

    Declaration
    public float Area { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Center

    The center of the box.

    Declaration
    public float3 Center { get; set; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Extent

    The half size of the box.

    Declaration
    public float3 Extent { get; set; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Height

    The height of the box.

    Declaration
    public float Height { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Max

    The maximum point of the box.

    Declaration
    public float3 Max { get; set; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Min

    The minimum point of the box.

    Declaration
    public float3 Min { get; set; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Volume

    Returns volume of the box.

    Declaration
    public float Volume { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Width

    The width of the box.

    Declaration
    public float Width { get; set; }
    Property Value
    Type Description
    System.Single

    Methods

    | Improve this Doc View Source

    CircumscribedSphere()

    Returns minimum sphere that fully covers shape.

    Declaration
    public Sphere CircumscribedSphere()
    Returns
    Type Description
    Sphere
    | Improve this Doc View Source

    ClosestPoint(float3)

    Returns a point on the perimeter of this box that is closest to the specified point.

    Declaration
    public float3 ClosestPoint(float3 point)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 point
    Returns
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Equals(Box)

    Declaration
    public bool Equals(Box other)
    Parameters
    Type Name Description
    Box other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    InscribedSphere()

    Returns maximum sphere that is inside the shape.

    Declaration
    public Sphere InscribedSphere()
    Returns
    Type Description
    Sphere
    | Improve this Doc View Source

    Overlap(Box)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(Box box)
    Parameters
    Type Name Description
    Box box
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(Box, float4x4)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(Box box, float4x4 transform)
    Parameters
    Type Name Description
    Box box
    Unity.Mathematics.float4x4 transform
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(Capsule)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(Capsule capsule)
    Parameters
    Type Name Description
    Capsule capsule
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(Plane)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(Plane plane)
    Parameters
    Type Name Description
    Plane plane
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(Sphere)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(Sphere sphere)
    Parameters
    Type Name Description
    Sphere sphere
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(Triangle)

    Returns true if triangle surfaces overlap.

    Declaration
    public bool Overlap(Triangle triangle)
    Parameters
    Type Name Description
    Triangle triangle
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlap(float3)

    Returns true if shapes surfaces overlap.

    Declaration
    public bool Overlap(float3 point)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 point
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Union(Box, Box)

    Returns minimum bounding box that contains both boxes.

    Declaration
    public static Box Union(Box a, Box b)
    Parameters
    Type Name Description
    Box a
    Box b
    Returns
    Type Description
    Box

    Operators

    | Improve this Doc View Source

    Equality(Box, Box)

    Declaration
    public static bool operator ==(Box lhs, Box rhs)
    Parameters
    Type Name Description
    Box lhs
    Box rhs
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Implicit(Box to Bounds)

    Declaration
    public static implicit operator Bounds(Box v)
    Parameters
    Type Name Description
    Box v
    Returns
    Type Description
    UnityEngine.Bounds
    | Improve this Doc View Source

    Implicit(Bounds to Box)

    Declaration
    public static implicit operator Box(Bounds v)
    Parameters
    Type Name Description
    UnityEngine.Bounds v
    Returns
    Type Description
    Box
    | Improve this Doc View Source

    Inequality(Box, Box)

    Declaration
    public static bool operator !=(Box lhs, Box rhs)
    Parameters
    Type Name Description
    Box lhs
    Box rhs
    Returns
    Type Description
    System.Boolean

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX