void R3TriangleVertex:: Transform (const R3Transformation& transformation) { // Transform position and normal transformation.Apply(position); transformation.ApplyInverseTranspose(normal); }
void R3Circle:: Transform (const R3Transformation& transformation) { // Transform circle ??? center.Transform(transformation); plane.Transform(transformation); if (!transformation.IsIsotropic()) RNWarning("Circle transformed by anisotropic transformation"); radius *= transformation.ScaleFactor(); }
void R3Sphere:: Transform (const R3Transformation& transformation) { // Transform center center.Transform(transformation); // Scale radius if (!transformation.IsIsotropic()) RNWarning("Sphere transformed by anisotropic transformation"); radius *= transformation.ScaleFactor(); }
void R3Plane:: InverseTransform (const R3Transformation& transformation) { // Transform plane ??? R3Point p = Point(); p.InverseTransform(transformation); transformation.ApplyTranspose(v); v.Normalize(); Reposition(p); }
void R3Point:: InverseTransform(const R3Transformation& transformation) { // Transform vector transformation.ApplyInverse(*this); }
void R3Point:: Transform(const R3Transformation& transformation) { // Transform point transformation.Apply(*this); }