Struct Sphere
Describes a sphere in 3D-space for bounding operations.
Inherited Members
Namespace: Vim.Math3d
Assembly: Vim.Math3D.dll
[DataContract]
public readonly struct Sphere : ITransformable3D<Sphere>, IEquatable<Sphere>
Constructors
View SourceSphere((Vector3 center, Single radius))
public Sphere((Vector3 center, float radius) tuple)
Sphere(Vector3, Single)
public Sphere(Vector3 center, float radius)
Fields
View SourceCenter
[DataMember]
public readonly Vector3 Center
MaxValue
public static Sphere MaxValue
MinValue
public static Sphere MinValue
Radius
[DataMember]
public readonly float Radius
Zero
public static Sphere Zero
Methods
View SourceAlmostEquals(Sphere, Single)
public readonly bool AlmostEquals(Sphere x, float tolerance = 1E-07F)
Contains(AABox)
Test if a bounding box is fully inside, outside, or just intersecting the sphere.
public readonly ContainmentType Contains(AABox box)
Contains(Sphere)
Test if a sphere is fully inside, outside, or just intersecting the sphere.
public readonly ContainmentType Contains(Sphere sphere)
Contains(Vector3)
Test if a point is fully inside, outside, or just intersecting the sphere.
public readonly ContainmentType Contains(Vector3 point)
Contains(Vector3, out ContainmentType)
Test if a point is fully inside, outside, or just intersecting the sphere.
public readonly void Contains(Vector3 point, out ContainmentType result)
Create(IEnumerable<Vector3>)
Creates the smallest Sphere that contains the given points
public static Sphere Create(IEnumerable<Vector3> points)
Create((Vector3 center, Single radius))
public static Sphere Create((Vector3 center, float radius) tuple)
Create(AABox)
Creates the smallest sphere that contains the box.
public static Sphere Create(AABox box)
Create(Vector3, Single)
public static Sphere Create(Vector3 center, float radius)
Create(Vector3[])
Creates a sphere from the given points
public static Sphere Create(params Vector3[] points)
Deconstruct(out Vector3, out Single)
public readonly void Deconstruct(out Vector3 center, out float radius)
Distance(Sphere)
public readonly float Distance(Sphere other)
Distance(Vector3)
public readonly float Distance(Vector3 point)
Equals(Object)
public override readonly bool Equals(object obj)
Overrides
Equals(Sphere)
public readonly bool Equals(Sphere x)
GetHashCode()
public override readonly int GetHashCode()
Overrides
Intersects(AABox)
Gets whether or not a specified AABox intersects with this sphere.
public readonly bool Intersects(AABox box)
Intersects(Plane)
Gets whether or not a specified Plane intersects with this sphere.
public readonly PlaneIntersectionType Intersects(Plane plane)
Intersects(Ray)
Gets whether or not a specified Ray intersects with this sphere.
public readonly float? Intersects(Ray ray)
Intersects(Sphere)
Gets whether or not the other Sphere intersects with this sphere.
public readonly bool Intersects(Sphere sphere)
Merge(Sphere)
Creates a sphere merging it with another
public readonly Sphere Merge(Sphere additional)
SetCenter(Vector3)
public readonly Sphere SetCenter(Vector3 x)
SetRadius(Single)
public readonly Sphere SetRadius(float x)
ToString()
public override readonly string ToString()
Overrides
Transform(Matrix4x4)
public readonly Sphere Transform(Matrix4x4 m)
Translate(Vector3)
public readonly Sphere Translate(Vector3 offset)
Operators
View SourceEquality(Sphere, Sphere)
public static bool operator ==(Sphere x0, Sphere x1)
Implicit((Vector3 center, Single radius) to Sphere)
public static implicit operator Sphere((Vector3 center, float radius) tuple)
Implicit(Sphere to (Vector3 center, Single radius))
public static implicit operator (Vector3 center, float radius)(Sphere self)
Inequality(Sphere, Sphere)
public static bool operator !=(Sphere x0, Sphere x1)