Struct 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 SourceAABox2D((Vector2 min, Vector2 max))
public AABox2D((Vector2 min, Vector2 max) tuple)
AABox2D(Vector2, Vector2)
public AABox2D(Vector2 min, Vector2 max)
Fields
View SourceEmpty
public static AABox2D Empty
Indices
public static readonly int[] Indices
Max
[DataMember]
public readonly Vector2 Max
MaxValue
public static AABox2D MaxValue
Min
[DataMember]
public readonly Vector2 Min
MinValue
public static AABox2D MinValue
Unit
public static readonly AABox2D Unit
Zero
public static AABox2D Zero
Properties
View SourceArea
public readonly float Area { get; }
Center
public readonly Vector2 Center { get; }
CenterBottom
public readonly Vector2 CenterBottom { get; }
CenterDistanceToOrigin
public readonly float CenterDistanceToOrigin { get; }
Corners
public readonly Vector2[] Corners { get; }
Count
public readonly int Count { get; }
Diagonal
public readonly float Diagonal { get; }
DistanceToOrigin
public readonly float DistanceToOrigin { get; }
Extent
public readonly Vector2 Extent { get; }
IsEmpty
public readonly bool IsEmpty { get; }
IsValid
public readonly bool IsValid { get; }
Item[Int32]
public readonly Vector2 this[int n] { get; }
MaxSide
public readonly float MaxSide { get; }
MinSide
public readonly float MinSide { get; }
Methods
View SourceAlmostEquals(AABox2D, Single)
public readonly bool AlmostEquals(AABox2D x, float tolerance = 1E-07F)
CenterDistance(Vector2)
Returns the distance of the point to the box center.
public readonly float CenterDistance(Vector2 point)
CompareTo(AABox2D)
public readonly int CompareTo(AABox2D x)
Contains(AABox2D)
public readonly ContainmentType Contains(AABox2D box)
Contains(Vector2)
public readonly bool Contains(Vector2 point)
Create((Vector2 min, Vector2 max))
public static AABox2D Create((Vector2 min, Vector2 max) tuple)
Create(Vector2, Vector2)
public static AABox2D Create(Vector2 min, Vector2 max)
CreateFromPoints(IEnumerable<Vector2>)
Create a bounding box from the given list of points.
public static AABox2D CreateFromPoints(IEnumerable<Vector2> points)
CreateFromPoints(Vector2[])
public static AABox2D CreateFromPoints(params Vector2[] points)
Deconstruct(out Vector2, out Vector2)
public readonly void Deconstruct(out Vector2 min, out Vector2 max)
Distance(Vector2)
public readonly float Distance(Vector2 point)
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)
GetCorners(Vector2[])
public readonly Vector2[] GetCorners(Vector2[] corners = null)
GetHashCode()
public override readonly int GetHashCode()
Overrides
System.ValueType.GetHashCode()
View Source
Intersection(AABox2D)
public readonly AABox2D Intersection(AABox2D other)
Intersects(AABox2D)
public readonly bool Intersects(AABox2D box)
Intersects(AABox2D, AABox2D)
public static bool Intersects(AABox2D box1, AABox2D box2)
IsInfinity()
public readonly bool IsInfinity()
IsNaN()
public readonly bool IsNaN()
Magnitude()
public readonly double Magnitude()
MagnitudeSquared()
public readonly double MagnitudeSquared()
Merge(AABox2D)
public readonly AABox2D Merge(AABox2D other)
Merge(Vector2)
public readonly AABox2D Merge(Vector2 other)
Recenter()
Moves the box so that it's origin is on the center
public readonly AABox2D Recenter()
RelativePosition(Vector2)
Returns where a point is relative to the bounding box on a scale of 0..1
public readonly Vector2 RelativePosition(Vector2 v)
Scale(Single)
Rescales the box
public readonly AABox2D Scale(float scale)
SetMax(Vector2)
public readonly AABox2D SetMax(Vector2 x)
SetMin(Vector2)
public readonly AABox2D SetMin(Vector2 x)
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 SourceAddition(AABox2D, AABox2D)
public static AABox2D operator +(AABox2D value1, AABox2D value2)
Addition(AABox2D, Vector2)
public static AABox2D operator +(AABox2D value1, Vector2 value2)
Equality(AABox2D, AABox2D)
public static bool operator ==(AABox2D x0, AABox2D x1)
GreaterThan(AABox2D, AABox2D)
public static bool operator>(AABox2D x0, AABox2D x1)
GreaterThanOrEqual(AABox2D, AABox2D)
public static bool operator >=(AABox2D x0, AABox2D x1)
Implicit((Vector2 min, Vector2 max) to AABox2D)
public static implicit operator AABox2D((Vector2 min, Vector2 max) tuple)
Implicit(AABox2D to (Vector2 min, Vector2 max))
public static implicit operator (Vector2 min, Vector2 max)(AABox2D self)
Inequality(AABox2D, AABox2D)
public static bool operator !=(AABox2D x0, AABox2D x1)
LessThan(AABox2D, AABox2D)
public static bool operator <(AABox2D x0, AABox2D x1)
LessThanOrEqual(AABox2D, AABox2D)
public static bool operator <=(AABox2D x0, AABox2D x1)
Subtraction(AABox2D, AABox2D)
public static AABox2D operator -(AABox2D value1, AABox2D value2)
Implements
System.IEquatable<T>
System.IComparable<T>