• 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 AABox

Implements
ITransformable3D<AABox>
System.IEquatable<AABox>
System.IComparable<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 Source

AABox((Vector3 min, Vector3 max))

public AABox((Vector3 min, Vector3 max) tuple)
View Source

AABox(Vector3, Vector3)

public AABox(Vector3 min, Vector3 max)

Fields

View Source

BackIndices

public static readonly int[] BackIndices
View Source

BottomIndices

public static readonly int[] BottomIndices
View Source

Empty

public static AABox Empty
View Source

FrontIndices

public static readonly int[] FrontIndices
View Source

LeftIndices

public static readonly int[] LeftIndices
View Source

Max

[DataMember]
public readonly Vector3 Max
View Source

MaxValue

public static AABox MaxValue
View Source

Min

[DataMember]
public readonly Vector3 Min
View Source

MinValue

public static AABox MinValue
View Source

RightIndices

public static readonly int[] RightIndices
View Source

TopIndices

public static readonly int[] TopIndices
View Source

Unit

public static readonly AABox Unit
View Source

Zero

public static AABox Zero

Properties

View Source

Center

public readonly Vector3 Center { get; }
View Source

CenterBottom

public readonly Vector3 CenterBottom { get; }
View Source

CenterDistanceToOrigin

public readonly float CenterDistanceToOrigin { get; }
View Source

Corners

public readonly Vector3[] Corners { get; }
View Source

Count

public readonly int Count { get; }
View Source

Diagonal

public readonly float Diagonal { get; }
View Source

DistanceToOrigin

public readonly float DistanceToOrigin { get; }
View Source

Extent

public readonly Vector3 Extent { get; }
View Source

IsEmpty

public readonly bool IsEmpty { get; }
View Source

IsValid

public readonly bool IsValid { get; }
View Source

Item[Int32]

public readonly Vector3 this[int n] { get; }
View Source

MaxFaceArea

public readonly float MaxFaceArea { get; }
View Source

MaxSide

public readonly float MaxSide { get; }
View Source

MinSide

public readonly float MinSide { get; }
View Source

Volume

public readonly float Volume { get; }

Methods

View Source

AlmostEquals(AABox, Single)

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

CenterDistance(Vector3)

Returns the distance of the point to the box center.

public readonly float CenterDistance(Vector3 point)
View Source

CompareTo(AABox)

public readonly int CompareTo(AABox x)
View Source

Contains(AABox)

public readonly ContainmentType Contains(AABox box)
View Source

Contains(Sphere)

public readonly ContainmentType Contains(Sphere sphere)
View Source

Contains(Vector3)

public readonly bool Contains(Vector3 point)
View Source

Create(IEnumerable<Vector3>)

Create a bounding box from the given list of points.

public static AABox Create(IEnumerable<Vector3> points = null)
View Source

Create((Vector3 min, Vector3 max))

public static AABox Create((Vector3 min, Vector3 max) tuple)
View Source

Create(Vector3, Vector3)

public static AABox Create(Vector3 min, Vector3 max)
View Source

Create(Vector3[])

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

CreateFromSphere(Sphere)

public static AABox CreateFromSphere(Sphere sphere)
View Source

Deconstruct(out Vector3, out Vector3)

public readonly void Deconstruct(out Vector3 min, out Vector3 max)
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(AABox)

public readonly bool Equals(AABox x)
View Source

FaceCenters()

Returns the center of each face.

public readonly Vector3[] FaceCenters()
View Source

FromCenterAndExtent(Vector3, Vector3)

public static AABox FromCenterAndExtent(Vector3 center, Vector3 extent)
View Source

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

GetCornersAndFaceCenters()

public readonly IEnumerable<Vector3> GetCornersAndFaceCenters()
View Source

GetHashCode()

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

Intersection(AABox)

public readonly AABox Intersection(AABox other)
View Source

Intersects(AABox)

public readonly bool Intersects(AABox box)
View Source

Intersects(AABox, out Boolean)

public readonly void Intersects(AABox box, out bool result)
View Source

Intersects(Plane)

public readonly PlaneIntersectionType Intersects(Plane plane)
View Source

Intersects(Sphere)

public readonly bool Intersects(Sphere sphere)
View Source

IsInfinity()

public readonly bool IsInfinity()
View Source

IsNaN()

public readonly bool IsNaN()
View Source

Lerp(Vector3)

Given a normalized position in bounding box, returns the actual position.

public readonly Vector3 Lerp(Vector3 v)
View Source

Magnitude()

public readonly double Magnitude()
View Source

MagnitudeSquared()

public readonly double MagnitudeSquared()
View Source

Merge(AABox)

public readonly AABox Merge(AABox other)
View Source

Merge(Vector3)

public readonly AABox Merge(Vector3 other)
View Source

Recenter()

Moves the box so that it's origin is on the center

public readonly AABox Recenter()
View Source

RelativePosition(Vector3)

Returns where a point is relative to the bounding box on a scale of 0..1

public readonly Vector3 RelativePosition(Vector3 v)
View Source

Scale(Single)

Rescales the box

public readonly AABox Scale(float scale)
View Source

SetCenter(Vector3)

public readonly AABox SetCenter(Vector3 v)
View Source

SetExtent(Vector3)

public readonly AABox SetExtent(Vector3 v)
View Source

SetMax(Vector3)

public readonly AABox SetMax(Vector3 x)
View Source

SetMin(Vector3)

public readonly AABox SetMin(Vector3 x)
View Source

ToSphere()

Returns the enclosing bounding sphere.

public readonly Sphere ToSphere()
View Source

ToString()

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

Transform(Matrix4x4)

public readonly AABox Transform(Matrix4x4 mat)
View Source

Translate(Vector3)

Moves the box by the given vector offset

public readonly AABox Translate(Vector3 offset)

Operators

View Source

Addition(AABox, AABox)

public static AABox operator +(AABox value1, AABox value2)
View Source

Addition(AABox, Vector3)

public static AABox operator +(AABox value1, Vector3 value2)
View Source

Equality(AABox, AABox)

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

GreaterThan(AABox, AABox)

public static bool operator>(AABox x0, AABox x1)
View Source

GreaterThanOrEqual(AABox, AABox)

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

Implicit((Vector3 min, Vector3 max) to AABox)

public static implicit operator AABox((Vector3 min, Vector3 max) tuple)
View Source

Implicit(AABox to (Vector3 min, Vector3 max))

public static implicit operator (Vector3 min, Vector3 max)(AABox self)
View Source

Inequality(AABox, AABox)

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

LessThan(AABox, AABox)

public static bool operator <(AABox x0, AABox x1)
View Source

LessThanOrEqual(AABox, AABox)

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

Subtraction(AABox, AABox)

public static AABox operator -(AABox value1, AABox value2)

Implements

ITransformable3D<TSelf>
System.IEquatable<T>
System.IComparable<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