
Functions | |
| void | DSet_Camera_By_Volume (const char *projection, double xmin, double xmax, double ymin, double ymax) |
| Similar to Set_Camera_By_Volume(), but accepts double-precision parameters and operates on double-precision cameras. More... | |
| void | Set_Camera_By_Volume (const char *projection, double xmin, double xmax, double ymin, double ymax) |
| Sets up the Camera so that the screen will show one simple rectangular box extracted from the infinite user data space. More... | |
| void DSet_Camera_By_Volume | ( | const char * | projection, |
| double | xmin, | ||
| double | xmax, | ||
| double | ymin, | ||
| double | ymax | ||
| ) |
Similar to Set_Camera_By_Volume(), but accepts double-precision parameters and operates on double-precision cameras.
| projection | - Special constant—either "perspective", "orthographic", "stretched", or an "oblique" form (see below). Can be uppercase, lowercase, or any mixture. |
| xmin | - Minimum limit along the X-axis, of what will visible. |
| xmax | - Maximum limit along the X-axis, of what will visible. |
| ymin | - Minimum limit along the Y-axis. |
| ymax | - Maximum limit along the Y-axis. |
| void Set_Camera_By_Volume | ( | const char * | projection, |
| double | xmin, | ||
| double | xmax, | ||
| double | ymin, | ||
| double | ymax | ||
| ) |
Sets up the Camera so that the screen will show one simple rectangular box extracted from the infinite user data space.
| projection | - Special constant—either "perspective", "orthographic", "stretched", or an "oblique" form (see below). Can be uppercase, lowercase, or any mixture. |
| xmin | - Minimum limit along the X-axis, of what will visible. |
| xmax | - Maximum limit along the X-axis, of what will visible. |
| ymin | - Minimum limit along the Y-axis. |
| ymax | - Maximum limit along the Y-axis. |
There are two major methods of determining how much of your scene is going to be visible on the screen— Set_Camera_By_Volume() , and the threesome of Camera Position, Camera Target, and Camera Field (or the general Set_Camera() ). Set_Camera_By_Volume() simplifies things by making some assumptions about the Z-axis. It also defines the field of view in terms of box, which might be more convenient for you, rather than in terms of a center and a radius.
Projection tells the system how to flatten your scene into 2-D and how to pack it into the available screen window. Choices for projection include:
The arguments that Set_Camera_By_Volume() passes to Set_Camera() are as follows: the camera projection is passed straight through, the up vector is set to (0.0, 1.0, 0.0), the field is set to max ( xmax - xmin, ymax - ymin ), the target is set to
and the camera position is set to
The "-2.5" is chosen so the view will be reasonable if you've chosen a perspective projection, or if you later toggle to a perspective projection.
For historical reasons the words for the regular projections can be abbreviated. The oblique projections cannot be abbreviated.