bool TestYLineOBox ( Vector const & V, OrientedBox const & B ) { Vector point = B.transformToLocal(V); Vector normal = B.rotateToLocal(Vector::unitY); return TestLineABox( Line3d(point,normal), B.getLocalShape() ); }
Vector ClosestPointOBox ( Vector const & V, OrientedBox const & B ) { Vector lV = B.transformToLocal(V); AxialBox lB = B.getLocalShape(); Vector lC = ClosestPointABox(lV,lB); Vector out = B.transformToWorld(lC); return out; }
ContainmentResult TestPointOBox ( Vector const & V, OrientedBox const & B ) { Vector localV = B.transformToLocal(V); return Test(localV,B.getLocalShape()); }