public Box3f FromFrame(Box3f box) { box.Center = FromFrameP(box.Center); box.AxisX = FromFrameV(box.AxisX); box.AxisY = FromFrameV(box.AxisY); box.AxisZ = FromFrameV(box.AxisZ); return(box); }
public Box3f ToFrame(Box3f box) { box.Center = ToFrameP(box.Center); box.AxisX = ToFrameV(box.AxisX); box.AxisY = ToFrameV(box.AxisY); box.AxisZ = ToFrameV(box.AxisZ); return(box); }
/// <summary> Map box *from* local frame coordinates into "world" coordinates </summary> public Box3f FromFrame(ref Box3f box) { box.Center = FromFrameP(ref box.Center); box.AxisX = FromFrameV(ref box.AxisX); box.AxisY = FromFrameV(ref box.AxisY); box.AxisZ = FromFrameV(ref box.AxisZ); return box; }
// I think this can be more efficient...no? At least could combine // all the axis-interval updates before updating Center... public void Contain(Box3f o) { Vector3f[] v = o.ComputeVertices(); for (int k = 0; k < 8; ++k) { Contain(v[k]); } }
///<summary> Map box *into* local coordinates of Frame </summary> public Box3f ToFrame(ref Box3f box) { box.Center = ToFrameP(ref box.Center); box.AxisX = ToFrameV(ref box.AxisX); box.AxisY = ToFrameV(ref box.AxisY); box.AxisZ = ToFrameV(ref box.AxisZ); return box; }