• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Vim.Math3d
    • AABox
    • AABox2D
    • AABox4D
    • AngularMotion
    • AxisAngle
    • Byte2
    • Byte3
    • Byte4
    • ColorHDR
    • ColorRGB
    • ColorRGBA
    • Complex
    • Constants
    • ContainmentType
    • CylindricalCoordinate
    • DAABox
    • DAABox2D
    • DAABox4D
    • DInterval
    • DPlane
    • DQuaternion
    • DRay
    • DSphere
    • DVector2
    • DVector3
    • DVector4
    • Euler
    • GeoCoordinate
    • Hash
    • HorizontalCoordinate
    • IMappable<TContainer, TPart>
    • Int2
    • Int3
    • Int4
    • Interval
    • IPoints
    • IPoints2D
    • ITransformable3D<TSelf>
    • Line
    • Line2D
    • LinearMotion
    • LinqUtil
    • LogPolarCoordinate
    • MathOps
    • Matrix4x4
    • Motion
    • MovementExtensions
    • Plane
    • PlaneIntersectionType
    • PolarCoordinate
    • Quad
    • Quad2D
    • Quaternion
    • Ray
    • Sphere
    • SphericalCoordinate
    • StatelessRandom
    • Stats<T>
    • Transform
    • Transformable3D
    • Triangle
    • Triangle2D
    • Vector2
    • Vector3
    • Vector4

Struct Sphere

Describes a sphere in 3D-space for bounding operations.

Implements
ITransformable3D<Sphere>
System.IEquatable<Sphere>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Vim.Math3d
Assembly: Vim.Math3D.dll
[DataContract]
public readonly struct Sphere : ITransformable3D<Sphere>, IEquatable<Sphere>

Constructors

View Source

Sphere((Vector3 center, Single radius))

public Sphere((Vector3 center, float radius) tuple)
View Source

Sphere(Vector3, Single)

public Sphere(Vector3 center, float radius)

Fields

View Source

Center

[DataMember]
public readonly Vector3 Center
View Source

MaxValue

public static Sphere MaxValue
View Source

MinValue

public static Sphere MinValue
View Source

Radius

[DataMember]
public readonly float Radius
View Source

Zero

public static Sphere Zero

Methods

View Source

AlmostEquals(Sphere, Single)

public readonly bool AlmostEquals(Sphere x, float tolerance = 1E-07F)
View Source

Contains(AABox)

Test if a bounding box is fully inside, outside, or just intersecting the sphere.

public readonly ContainmentType Contains(AABox box)
View Source

Contains(Sphere)

Test if a sphere is fully inside, outside, or just intersecting the sphere.

public readonly ContainmentType Contains(Sphere sphere)
View Source

Contains(Vector3)

Test if a point is fully inside, outside, or just intersecting the sphere.

public readonly ContainmentType Contains(Vector3 point)
View Source

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)
View Source

Create(IEnumerable<Vector3>)

Creates the smallest Sphere that contains the given points

public static Sphere Create(IEnumerable<Vector3> points)
View Source

Create((Vector3 center, Single radius))

public static Sphere Create((Vector3 center, float radius) tuple)
View Source

Create(AABox)

Creates the smallest sphere that contains the box.

public static Sphere Create(AABox box)
View Source

Create(Vector3, Single)

public static Sphere Create(Vector3 center, float radius)
View Source

Create(Vector3[])

Creates a sphere from the given points

public static Sphere Create(params Vector3[] points)
View Source

Deconstruct(out Vector3, out Single)

public readonly void Deconstruct(out Vector3 center, out float radius)
View Source

Distance(Sphere)

public readonly float Distance(Sphere other)
View Source

Distance(Vector3)

public readonly float Distance(Vector3 point)
View Source

Equals(Object)

public override readonly bool Equals(object obj)
Overrides
System.ValueType.Equals(System.Object)
View Source

Equals(Sphere)

public readonly bool Equals(Sphere x)
View Source

GetHashCode()

public override readonly int GetHashCode()
Overrides
System.ValueType.GetHashCode()
View Source

Intersects(AABox)

Gets whether or not a specified AABox intersects with this sphere.

public readonly bool Intersects(AABox box)
View Source

Intersects(Plane)

Gets whether or not a specified Plane intersects with this sphere.

public readonly PlaneIntersectionType Intersects(Plane plane)
View Source

Intersects(Ray)

Gets whether or not a specified Ray intersects with this sphere.

public readonly float? Intersects(Ray ray)
View Source

Intersects(Sphere)

Gets whether or not the other Sphere intersects with this sphere.

public readonly bool Intersects(Sphere sphere)
View Source

Merge(Sphere)

Creates a sphere merging it with another

public readonly Sphere Merge(Sphere additional)
View Source

SetCenter(Vector3)

public readonly Sphere SetCenter(Vector3 x)
View Source

SetRadius(Single)

public readonly Sphere SetRadius(float x)
View Source

ToString()

public override readonly string ToString()
Overrides
System.ValueType.ToString()
View Source

Transform(Matrix4x4)

public readonly Sphere Transform(Matrix4x4 m)
View Source

Translate(Vector3)

public readonly Sphere Translate(Vector3 offset)

Operators

View Source

Equality(Sphere, Sphere)

public static bool operator ==(Sphere x0, Sphere x1)
View Source

Implicit((Vector3 center, Single radius) to Sphere)

public static implicit operator Sphere((Vector3 center, float radius) tuple)
View Source

Implicit(Sphere to (Vector3 center, Single radius))

public static implicit operator (Vector3 center, float radius)(Sphere self)
View Source

Inequality(Sphere, Sphere)

public static bool operator !=(Sphere x0, Sphere x1)

Implements

ITransformable3D<TSelf>
System.IEquatable<T>

Extension Methods

Transformable3D.Transform<T>(ITransformable3D<T>, Matrix4x4[])
Transformable3D.Translate<T>(ITransformable3D<T>, Vector3)
Transformable3D.Translate<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.Rotate<T>(ITransformable3D<T>, Quaternion)
Transformable3D.Scale<T>(ITransformable3D<T>, Single)
Transformable3D.Scale<T>(ITransformable3D<T>, Vector3)
Transformable3D.Scale<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.ScaleX<T>(ITransformable3D<T>, Single)
Transformable3D.ScaleY<T>(ITransformable3D<T>, Single)
Transformable3D.ScaleZ<T>(ITransformable3D<T>, Single)
Transformable3D.LookAt<T>(ITransformable3D<T>, Vector3, Vector3, Vector3)
Transformable3D.RotateAround<T>(ITransformable3D<T>, Vector3, Single)
Transformable3D.Rotate<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.Reflect<T>(ITransformable3D<T>, Plane)
Transformable3D.RotateX<T>(ITransformable3D<T>, Single)
Transformable3D.RotateY<T>(ITransformable3D<T>, Single)
Transformable3D.RotateZ<T>(ITransformable3D<T>, Single)
Transformable3D.TranslateRotateScale<T>(ITransformable3D<T>, Vector3, Quaternion, Vector3)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright VIM 2021, Generated by DocFX