Struct Bounds4
Representation for bounds in 4
public struct Bounds4
Constructors
Bounds4(Vector4)
Create a bound with zero center and given extent
public Bounds4(Vector4 extent)
Bounds4(Vector4, Vector4)
Create a bound with given min and max position
public Bounds4(Vector4 Min, Vector4 Max)
Fields
max
Maximum position of the bound
public Vector4 max
min
Minimum position of the bound
public Vector4 min
Properties
center
Center position of the bound
public Vector4 center { get; }
extent
Extent (center to corner distance) of the bound
public Vector4 extent { get; }
infinite
Returns a bound with negative infinity size
public static Bounds4 infinite { get; }
size
Size (edge to edge distance) of the bound
public Vector4 size { get; }
zero
Returns a bound with zero size and zero center
public static Bounds4 zero { get; }
Methods
Allocate(Vector4)
Expand the bound to given point
public void Allocate(Vector4 pos)
Clamp(Vector4)
Returns a point that either inside or touching the bound
public Vector4 Clamp(Vector4 point)
Clip(Vector4)
Returns a point that either outside or touching the bound
public Vector4 Clip(Vector4 t)
Combine(Bounds4, Bounds4)
Combine two bounds
public static Bounds4 Combine(Bounds4 a, Bounds4 b)
Compare(Vector4, Bounds4, Bounds4)
Compare which Bounds4 is the closest. Positive means L is closer
public static float Compare(Vector4 center, Bounds4 l, Bounds4 r)
Contains(Bounds4)
Is this bound contains the whole cell of the other bound?
public bool Contains(Bounds4 other)
Contains(Vector4)
Is this bound contains the given point
public bool Contains(Vector4 point)
Interpolate(Vector4)
Interpolate two vector by T.
public Vector4 Interpolate(Vector4 t)
Remarks
The interpolation is not clamped
Intersect(Bounds4, Bounds4)
Intersect two bounds
public static Bounds4 Intersect(Bounds4 a, Bounds4 b)
IsIntersecting(Bounds4, Bounds4)
Determine if and only if A partially contains B
public static bool IsIntersecting(Bounds4 a, Bounds4 b)
IsIntersecting(Plane4)
Is the plane hits part of the bound?
public bool IsIntersecting(Plane4 plane)
Raycast(Vector4, Vector4)
Check if given ray is colliding with the bound
public bool Raycast(Vector4 p, Vector4 d)
Scale(Bounds4, Vector4)
Scales the bound's extent
public static Bounds4 Scale(Bounds4 b, Vector4 s)