Next: , Previous: Focus Reference, Up: Focus Reference


23.1 Data Members

— Private variable: Point position

The location of the Focus in the world coordinate system.

— Private variable: Point direction

The direction of view from position into the scene.

— Private variable: Point up

The direction that will be at the top of the projected drawing.

— Private variable: real distance

The distance of the Focus from the plane of projection.

— Private variable: real angle

Used for determining the up direction.

— Private variable: char axis

The main axis onto which the Focus is transformed in order to perform the perspective projection, z by default.

It will normally not matter which axis is used, but it might be advantageous to use a particular axis in some special situations.

— Private variable: Transform transform

The Transform, which will be applied to the Shapes on the Picture, when the latter is output. The effect of this is equivalent to transforming the Focus, so that it lies on a major axis.

          Focus f(5, 5, -10, 2, 4, 10, 10, 180);
          ⇒
          f.transform ==
           0.989  -0.00733  -0.148  0
           0       0.999    -0.0494 0
           0.148   0.0488    0.988  0
          -3.4    -4.47      0.865  1
          
— Private variable: Transform persp

The Transform representing the perspective transformation for a particular Focus. Let d stand for distance, then

          persp ==
          1 0 0  0
          0 1 0  0
          0 0 0 1/d
          0 0 0  1