Beispiel #1
0
void R3TriangleVertex::
Transform (const R3Transformation& transformation)
{
  // Transform position and normal
  transformation.Apply(position);
  transformation.ApplyInverseTranspose(normal);
}
Beispiel #2
0
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();
}
Beispiel #3
0
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();
}
Beispiel #4
0
void R3Plane::
InverseTransform (const R3Transformation& transformation)
{
    // Transform plane ???
    R3Point p = Point();
    p.InverseTransform(transformation);
    transformation.ApplyTranspose(v);
    v.Normalize();
    Reposition(p);
}
Beispiel #5
0
void R3Point::
InverseTransform(const R3Transformation& transformation)
{
    // Transform vector
    transformation.ApplyInverse(*this);
}
Beispiel #6
0
void R3Point::
Transform(const R3Transformation& transformation)
{
    // Transform point
    transformation.Apply(*this);
}