Search Results for

    Show / Hide Table of Contents

    Struct Sphere

    A sphere is a shape consisting of all points in a plane that are at a given distance from a given point, the centre.

    Implements
    System.IEquatable<Sphere>
    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 Sphere : IEquatable<Sphere>

    Constructors

    | Improve this Doc View Source

    Sphere(float3, Single)

    Declaration
    public Sphere(float3 center, float radius)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 center
    System.Single radius

    Fields

    | Improve this Doc View Source

    Center

    Center of the sphere.

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

    Radius

    Radius of the sphere.

    Declaration
    public float Radius
    Field Value
    Type Description
    System.Single

    Properties

    | Improve this Doc View Source

    Area

    Returns the area of the sphere.

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

    Diameter

    Diameter of the sphere. Diameter = 2 * Radius.

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

    Unit

    Returns unit sphere.

    Declaration
    public static Sphere Unit { get; }
    Property Value
    Type Description
    Sphere
    | Improve this Doc View Source

    Volume

    Returns the volume of the sphere.

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

    Methods

    | Improve this Doc View Source

    BoundingBox()

    Returns minimum rectangle that fully covers shape.

    Declaration
    public Box BoundingBox()
    Returns
    Type Description
    Box
    | Improve this Doc View Source

    ClosestPoint(float3)

    Returns a point on the perimeter of this sphere 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(Sphere)

    Declaration
    public bool Equals(Sphere other)
    Parameters
    Type Name Description
    Sphere 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

    Overlap(Box)

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

    Overlap(Capsule)

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

    Overlap(Sphere)

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

    Overlap(float3)

    Returns true if shapes surfaces overlap.

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

    Union(Sphere, Sphere)

    Returns minimum bounding sphere that contains both spheres.

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

    Operators

    | Improve this Doc View Source

    Equality(Sphere, Sphere)

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

    Inequality(Sphere, Sphere)

    Declaration
    public static bool operator !=(Sphere lhs, Sphere rhs)
    Parameters
    Type Name Description
    Sphere lhs
    Sphere 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