98
Chapter 9: Viewing the Scene
Figure 9-1 Viewport
You set the size of the viewport using the following csContext method:
static void setViewport(csInt x, csInt y, csInt w, csInt h);
x and y are the coordinates of the lower, left corner of the viewport (where the lower, left
corner of the csWindow is (0. 0)).
w and h are the width and height of the viewport.
Using a Camera to View a Scene
Cosmo 3D provides a variety of cameras to position, orient, and delimit the view of the
shapes in the scene graph. This section describes the different cameras that are available,
including:
•“csCamera” on page 99.
•“csOrthoCamera” on page 101.
•“csPerspCamera” on page 101.
•“csFrustumCamera” on page 105.
Window
Monitor screen
Viewport
Scene