Struct AABox
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 AABox : ITransformable3D<AABox>, IEquatable<AABox>, IComparable<AABox>
Constructors
View SourceAABox((Vector3 min, Vector3 max))
public AABox((Vector3 min, Vector3 max) tuple)
AABox(Vector3, Vector3)
public AABox(Vector3 min, Vector3 max)
Fields
View SourceBackIndices
public static readonly int[] BackIndices
BottomIndices
public static readonly int[] BottomIndices
Empty
public static AABox Empty
FrontIndices
public static readonly int[] FrontIndices
LeftIndices
public static readonly int[] LeftIndices
Max
[DataMember]
public readonly Vector3 Max
MaxValue
public static AABox MaxValue
Min
[DataMember]
public readonly Vector3 Min
MinValue
public static AABox MinValue
RightIndices
public static readonly int[] RightIndices
TopIndices
public static readonly int[] TopIndices
Unit
public static readonly AABox Unit
Zero
public static AABox Zero
Properties
View SourceCenter
public readonly Vector3 Center { get; }
CenterBottom
public readonly Vector3 CenterBottom { get; }
CenterDistanceToOrigin
public readonly float CenterDistanceToOrigin { get; }
Corners
public readonly Vector3[] Corners { get; }
Count
public readonly int Count { get; }
Diagonal
public readonly float Diagonal { get; }
DistanceToOrigin
public readonly float DistanceToOrigin { get; }
Extent
public readonly Vector3 Extent { get; }
IsEmpty
public readonly bool IsEmpty { get; }
IsValid
public readonly bool IsValid { get; }
Item[Int32]
public readonly Vector3 this[int n] { get; }
MaxFaceArea
public readonly float MaxFaceArea { get; }
MaxSide
public readonly float MaxSide { get; }
MinSide
public readonly float MinSide { get; }
Volume
public readonly float Volume { get; }
Methods
View SourceAlmostEquals(AABox, Single)
public readonly bool AlmostEquals(AABox x, float tolerance = 1E-07F)
CenterDistance(Vector3)
Returns the distance of the point to the box center.
public readonly float CenterDistance(Vector3 point)
CompareTo(AABox)
public readonly int CompareTo(AABox x)
Contains(AABox)
public readonly ContainmentType Contains(AABox box)
Contains(Sphere)
public readonly ContainmentType Contains(Sphere sphere)
Contains(Vector3)
public readonly bool Contains(Vector3 point)
Create(IEnumerable<Vector3>)
Create a bounding box from the given list of points.
public static AABox Create(IEnumerable<Vector3> points = null)
Create((Vector3 min, Vector3 max))
public static AABox Create((Vector3 min, Vector3 max) tuple)
Create(Vector3, Vector3)
public static AABox Create(Vector3 min, Vector3 max)
Create(Vector3[])
public static AABox Create(params Vector3[] points)
CreateFromSphere(Sphere)
public static AABox CreateFromSphere(Sphere sphere)
Deconstruct(out Vector3, out Vector3)
public readonly void Deconstruct(out Vector3 min, out Vector3 max)
Distance(Vector3)
public readonly float Distance(Vector3 point)
Equals(Object)
public override readonly bool Equals(object obj)
Overrides
System.ValueType.Equals(System.Object)
View Source
Equals(AABox)
public readonly bool Equals(AABox x)
FaceCenters()
Returns the center of each face.
public readonly Vector3[] FaceCenters()
FromCenterAndExtent(Vector3, Vector3)
public static AABox FromCenterAndExtent(Vector3 center, Vector3 extent)
GetCorners(Vector3[])
This is the four front corners followed by the four back corners all as if looking from the front going in counter-clockwise order from bottom left.
public readonly Vector3[] GetCorners(Vector3[] corners = null)
GetCornersAndFaceCenters()
public readonly IEnumerable<Vector3> GetCornersAndFaceCenters()
GetHashCode()
public override readonly int GetHashCode()
Overrides
System.ValueType.GetHashCode()
View Source
Intersection(AABox)
public readonly AABox Intersection(AABox other)
Intersects(AABox)
public readonly bool Intersects(AABox box)
Intersects(AABox, out Boolean)
public readonly void Intersects(AABox box, out bool result)
Intersects(Plane)
public readonly PlaneIntersectionType Intersects(Plane plane)
Intersects(Sphere)
public readonly bool Intersects(Sphere sphere)
IsInfinity()
public readonly bool IsInfinity()
IsNaN()
public readonly bool IsNaN()
Lerp(Vector3)
Given a normalized position in bounding box, returns the actual position.
public readonly Vector3 Lerp(Vector3 v)
Magnitude()
public readonly double Magnitude()
MagnitudeSquared()
public readonly double MagnitudeSquared()
Merge(AABox)
public readonly AABox Merge(AABox other)
Merge(Vector3)
public readonly AABox Merge(Vector3 other)
Recenter()
Moves the box so that it's origin is on the center
public readonly AABox Recenter()
RelativePosition(Vector3)
Returns where a point is relative to the bounding box on a scale of 0..1
public readonly Vector3 RelativePosition(Vector3 v)
Scale(Single)
Rescales the box
public readonly AABox Scale(float scale)
SetCenter(Vector3)
public readonly AABox SetCenter(Vector3 v)
SetExtent(Vector3)
public readonly AABox SetExtent(Vector3 v)
SetMax(Vector3)
public readonly AABox SetMax(Vector3 x)
SetMin(Vector3)
public readonly AABox SetMin(Vector3 x)
ToSphere()
Returns the enclosing bounding sphere.
public readonly Sphere ToSphere()
ToString()
public override readonly string ToString()
Overrides
System.ValueType.ToString()
View Source
Transform(Matrix4x4)
public readonly AABox Transform(Matrix4x4 mat)
Translate(Vector3)
Moves the box by the given vector offset
public readonly AABox Translate(Vector3 offset)
Operators
View SourceAddition(AABox, AABox)
public static AABox operator +(AABox value1, AABox value2)
Addition(AABox, Vector3)
public static AABox operator +(AABox value1, Vector3 value2)
Equality(AABox, AABox)
public static bool operator ==(AABox x0, AABox x1)
GreaterThan(AABox, AABox)
public static bool operator>(AABox x0, AABox x1)
GreaterThanOrEqual(AABox, AABox)
public static bool operator >=(AABox x0, AABox x1)
Implicit((Vector3 min, Vector3 max) to AABox)
public static implicit operator AABox((Vector3 min, Vector3 max) tuple)
Implicit(AABox to (Vector3 min, Vector3 max))
public static implicit operator (Vector3 min, Vector3 max)(AABox self)
Inequality(AABox, AABox)
public static bool operator !=(AABox x0, AABox x1)
LessThan(AABox, AABox)
public static bool operator <(AABox x0, AABox x1)
LessThanOrEqual(AABox, AABox)
public static bool operator <=(AABox x0, AABox x1)
Subtraction(AABox, AABox)
public static AABox operator -(AABox value1, AABox value2)
Implements
System.IEquatable<T>
System.IComparable<T>