1 // This code is in the public domain -- castanyo@yahoo.es 2 3 #include "Plane.h" 4 #include "Matrix.h" 5 6 namespace nv 7 { transformPlane(const Matrix & m,Plane::Arg p)8 Plane transformPlane(const Matrix& m, Plane::Arg p) 9 { 10 Vector3 newVec = transformVector(m, p.vector()); 11 12 Vector3 ptInPlane = p.offset() * p.vector(); 13 ptInPlane = transformPoint(m, ptInPlane); 14 15 return Plane(newVec, ptInPlane); 16 } 17 } 18