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

Implements
System.IEquatable<AABox2D>
System.IComparable<AABox2D>
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 AABox2D : IEquatable<AABox2D>, IComparable<AABox2D>

Constructors

View Source

AABox2D((Vector2 min, Vector2 max))

public AABox2D((Vector2 min, Vector2 max) tuple)
View Source

AABox2D(Vector2, Vector2)

public AABox2D(Vector2 min, Vector2 max)

Fields

View Source

Empty

public static AABox2D Empty
View Source

Indices

public static readonly int[] Indices
View Source

Max

[DataMember]
public readonly Vector2 Max
View Source

MaxValue

public static AABox2D MaxValue
View Source

Min

[DataMember]
public readonly Vector2 Min
View Source

MinValue

public static AABox2D MinValue
View Source

Unit

public static readonly AABox2D Unit
View Source

Zero

public static AABox2D Zero

Properties

View Source

Area

public readonly float Area { get; }
View Source

Center

public readonly Vector2 Center { get; }
View Source

CenterBottom

public readonly Vector2 CenterBottom { get; }
View Source

CenterDistanceToOrigin

public readonly float CenterDistanceToOrigin { get; }
View Source

Corners

public readonly Vector2[] 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 Vector2 Extent { get; }
View Source

IsEmpty

public readonly bool IsEmpty { get; }
View Source

IsValid

public readonly bool IsValid { get; }
View Source

Item[Int32]

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

MaxSide

public readonly float MaxSide { get; }
View Source

MinSide

public readonly float MinSide { get; }

Methods

View Source

AlmostEquals(AABox2D, Single)

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

CenterDistance(Vector2)

Returns the distance of the point to the box center.

public readonly float CenterDistance(Vector2 point)
View Source

CompareTo(AABox2D)

public readonly int CompareTo(AABox2D x)
View Source

Contains(AABox2D)

public readonly ContainmentType Contains(AABox2D box)
View Source

Contains(Vector2)

public readonly bool Contains(Vector2 point)
View Source

Create((Vector2 min, Vector2 max))

public static AABox2D Create((Vector2 min, Vector2 max) tuple)
View Source

Create(Vector2, Vector2)

public static AABox2D Create(Vector2 min, Vector2 max)
View Source

CreateFromPoints(IEnumerable<Vector2>)

Create a bounding box from the given list of points.

public static AABox2D CreateFromPoints(IEnumerable<Vector2> points)
View Source

CreateFromPoints(Vector2[])

public static AABox2D CreateFromPoints(params Vector2[] points)
View Source

Deconstruct(out Vector2, out Vector2)

public readonly void Deconstruct(out Vector2 min, out Vector2 max)
View Source

Distance(Vector2)

public readonly float Distance(Vector2 point)
View Source

Equals(Object)

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

Equals(AABox2D)

public readonly bool Equals(AABox2D x)
View Source

GetCorners(Vector2[])

public readonly Vector2[] GetCorners(Vector2[] corners = null)
View Source

GetHashCode()

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

Intersection(AABox2D)

public readonly AABox2D Intersection(AABox2D other)
View Source

Intersects(AABox2D)

public readonly bool Intersects(AABox2D box)
View Source

Intersects(AABox2D, AABox2D)

public static bool Intersects(AABox2D box1, AABox2D box2)
View Source

IsInfinity()

public readonly bool IsInfinity()
View Source

IsNaN()

public readonly bool IsNaN()
View Source

Magnitude()

public readonly double Magnitude()
View Source

MagnitudeSquared()

public readonly double MagnitudeSquared()
View Source

Merge(AABox2D)

public readonly AABox2D Merge(AABox2D other)
View Source

Merge(Vector2)

public readonly AABox2D Merge(Vector2 other)
View Source

Recenter()

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

public readonly AABox2D Recenter()
View Source

RelativePosition(Vector2)

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

public readonly Vector2 RelativePosition(Vector2 v)
View Source

Scale(Single)

Rescales the box

public readonly AABox2D Scale(float scale)
View Source

SetMax(Vector2)

public readonly AABox2D SetMax(Vector2 x)
View Source

SetMin(Vector2)

public readonly AABox2D SetMin(Vector2 x)
View Source

ToString()

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

Translate(Vector2)

Moves the box by the given vector offset

public readonly AABox2D Translate(Vector2 offset)

Operators

View Source

Addition(AABox2D, AABox2D)

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

Addition(AABox2D, Vector2)

public static AABox2D operator +(AABox2D value1, Vector2 value2)
View Source

Equality(AABox2D, AABox2D)

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

GreaterThan(AABox2D, AABox2D)

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

GreaterThanOrEqual(AABox2D, AABox2D)

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

Implicit((Vector2 min, Vector2 max) to AABox2D)

public static implicit operator AABox2D((Vector2 min, Vector2 max) tuple)
View Source

Implicit(AABox2D to (Vector2 min, Vector2 max))

public static implicit operator (Vector2 min, Vector2 max)(AABox2D self)
View Source

Inequality(AABox2D, AABox2D)

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

LessThan(AABox2D, AABox2D)

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

LessThanOrEqual(AABox2D, AABox2D)

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

Subtraction(AABox2D, AABox2D)

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

Implements

System.IEquatable<T>
System.IComparable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright VIM 2021, Generated by DocFX