예제 #1
0
파일: camera.cpp 프로젝트: acekiller/povray
void Camera::Transform(const TRANSFORM *Trans)
{
	MTransPoint(Location, Location, Trans);
	MTransDirection(Direction, Direction, Trans);
	MTransDirection(Up, Up, Trans);
	MTransDirection(Right, Right, Trans);
}
예제 #2
0
void Transform_Camera(CAMERA *Camera, TRANSFORM *Trans)
{
  MTransPoint(Camera->Location, Camera->Location, Trans);
  MTransDirection(Camera->Direction, Camera->Direction, Trans);
  MTransDirection(Camera->Up, Camera->Up, Trans);
  MTransDirection(Camera->Right, Camera->Right, Trans);
}
예제 #3
0
static void Rotate_Plane (OBJECT *Object, VECTOR, TRANSFORM *Trans)
{
  if (((PLANE *)Object)->Trans == NULL)
  {
    MTransDirection(((PLANE *)Object)->Normal_Vector, ((PLANE *)Object)->Normal_Vector, Trans);

    Compute_Plane_BBox(((PLANE *)Object));
  }
  else
  {
    Transform_Plane (Object, Trans);
  }
}
예제 #4
0
파일: planes.cpp 프로젝트: Degot/povray
void Plane::Rotate(const VECTOR, const TRANSFORM *tr)
{
	if(Trans == NULL)
	{
		MTransDirection(Normal_Vector, Normal_Vector, tr);

		Compute_BBox();
	}
	else
	{
		Transform(tr);
	}
}
예제 #5
0
void LightSource::Transform(const TRANSFORM *tr)
{
    DBL len;

    MTransPoint(Center, Center,    tr);
    MTransPoint(Points_At, Points_At, tr);
    MTransDirection(Axis1, Axis1,     tr);
    MTransDirection(Axis2, Axis2,     tr);

    MTransDirection(Direction, Direction, tr);

    /* Make sure direction has unit length. */

    len = Direction.length();

    if(len > EPSILON)
        Direction /= len;

    if(!children.empty())
        Transform_Object(children[0], tr);

    if(Projected_Through_Object != NULL)
        Transform_Object(Projected_Through_Object, tr);
}