static Box3d Transform2(Box3d box, M44d trafo) { var xa = trafo.C0.XYZ * box.Min.X; var xb = trafo.C0.XYZ * box.Max.X; var ya = trafo.C1.XYZ * box.Min.Y; var yb = trafo.C1.XYZ * box.Max.Y; var za = trafo.C2.XYZ * box.Min.Z; var zb = trafo.C2.XYZ * box.Max.Z; return(new Box3d( V3d.Min(xa, xb) + V3d.Min(ya, yb) + V3d.Min(za, zb) + trafo.C3.XYZ, V3d.Max(xa, xb) + V3d.Max(ya, yb) + V3d.Max(za, zb) + trafo.C3.XYZ)); }