An open source, cross-platform, OpenGL tutor.

home screenshots documentation download

contact

home > documentation > world space viewer


World Space Viewer

The world space viewer provides more insight on the scene, as it enables you to visually observe the projection frustum and to interact with it, so that you can get a better understanding on what is actually going on.

Instead of executing it the scene's projection, it draws it in its frustum form. Hence, another camera is set up that observes the scene in its frustum, which can be manipulated interactively. See the Controls for more details regarding interaction.

This viewer has many option settings, such as the ability turn on or off the rendering of the axes, frustum and X-Y grid and to set the camera to use either an orthographic or a perspective projection, amongst many others.
See the Options > World View sub-menu for more details.

Further information:


Controls

The following table contains the actions that can be performed with the world space viewer, along with the primary and alternate control methods that enable you to execute them.

All of the actions can be performed with a 3-button mouse, but if you don't have one, then you can use the alternate controls, where keyboard number keys are introduced as modifiers to a simple left-button mouse click.

Action Primary Control Alternate Control
Rotate scene around X-axis Hold down left mouse button while moving mouse back or forward.  
Rotate scene around Y-axis Hold down left mouse button while moving mouse left or right.  
Rotate scene around Z-axis Hold down left + middle mouse buttons while moving mouse left or right. Hold down the number 3 key + left mouse button while moving mouse left or right.
Translate scene up or down. Hold down right mouse button while moving mouse back or forward. Hold down the number 2 key + left mouse button while moving mouse back or forward.
Translate scene left or right. Hold down right mouse button while moving mouse left or right. Hold down the number 2 key + left mouse button while moving mouse left or right.
Translate scene backwards or forwards (into page or out-of page, respectively).

Hold down middle mouse button while moving mouse back or forward.
OR
Use scroll wheel in back or forward rotations.

Hold down the number 1 key + left mouse button while moving mouse back or forward.
Snap rotation to nearest 45° or 90° angle. Double-click left mouse button.  

Note: the above naming of left and right mouse buttons assumes a right-handed mouse.


Screenshots


The world space viewer in its default state


A scene that uses the default orthographic projection


A scene that uses a perspective projection


World space viewer with modified option settings
(frustum disabled, background set to gray, enlarged to fit window)


Limitations

Viewports are NOT supported in the world space view. If viewports are used, then they will just be ignored by this viewer. However, they will work correctly in the screen space view.

Unlike the screen space viewer, the world space viewer's scene is reinitialized (i.e. the OpenGL state is cleared and the initialization commands are re-executed) EVERY time a redraw is made. This is necessary, as the camera has an effect on the initialization commands and the most common reason that an update would be required is because the camera has been repositioned / rotated, etc.



Last Updated: March 4, 2004