Camera position

The sweep in Figure 170 is viewed with the camera moved up 500 world-coordinate units in the y direction. Here is the code to move the camera. Note that the sweep must be drawn into port for the new camera position to take effect.

              TPerspectiveCamera* camera = new TPerspectiveCamera();
              camera->SetPosition( TGPoint3D( 1440, 500, 1440 ) );
      
              TSceneBundle sceneBundle;
              sceneBundle.AdoptCamera( camera );
      
              sceneBundle.SetAmbientLight( TRGBColor( 1, 1, 1 ) );
              TParallelLight* light = new TParallelLight( TGPoint3D( -1,-1,-1 ), 
                                                          TRGBColor( 1,1,1 ) );
              sceneBundle.AdoptLight( light );
      
              TLinkedScenePort port( &thePort, &sceneBundle );

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker