public Range4i(vector min, vector max) { Min = min; Max = max; }
public void ExpandSelf(vector v) { Min.SubSelf(v); Max.AddSelf(v); }
public Range4i(vector position) { Min = position; Max = position; }
public void MergeSelf(vector v) { Min.ElementWiseMinSelf(v); Max.ElementWiseMaxSelf(v); }
public volume Expand(vector v) { return(new volume(Min - v, Max + v)); }
public bool Contains(vector v) { return(Min <= v && v <= Max); }
public volume Merge(vector v) { return(new volume(vector.ElementWiseMin(Min, v), vector.ElementWiseMax(Max, v))); }
public vector Cross(vector v) { return(new vector(Y * v.Z - Z * v.Y, Z * v.W - W * v.Z, W * v.X - X * v.W, X * v.Y - Y * v.X)); }
public element Dot(vector v) { return(X * v.X + Y * v.Y + Z * v.Z + W * v.W); }
public Aabb4i(Aabb4d v) { Center = new vector(v.Center); Extents = new vector(v.Extents); }
public Aabb4i(vector center, vector extents) { Center = center; Extents = extents; }
public bool Contains(vector v) { v.SubSelf(Center); return(Math.Abs(v.X) <= Extents.X && Math.Abs(v.Y) <= Extents.Y && Math.Abs(v.Z) <= Extents.Z && Math.Abs(v.W) <= Extents.W); }