Functions | |
void | DZoom_Camera (double zoom) |
Similar to Zoom_Camera, but operates on a double precision camera. More... | |
void | Zoom_Camera (double zoom) |
Narrows or enlarges the viewing field of the camera. More... | |
void DZoom_Camera | ( | double | zoom | ) |
Similar to Zoom_Camera, but operates on a double precision camera.
zoom | - The relative change in the width of the field of view. A factor of 2 will zoom in until the viewing field is half as wide as it was. A factor of 0.5 will zoom out the same amount. |
void Zoom_Camera | ( | double | zoom | ) |
Narrows or enlarges the viewing field of the camera.
zoom | - The relative change in the width of the field of view. A factor of 2 will zoom in until the viewing field is half as wide as it was. A factor of 0.5 will zoom out the same amount. |
Once you've established a point of view, with Set_Camera_Position() , Set_Camera_Target() , and Set_Camera_Field() , or with Set_Camera_By_Volume() , there are various ways provided to look around. Zoom_Camera() changes the viewing field—the "focal length"—of the camera to give the effect of "focusing in or out" on the scene at hand.
If the factors involved are small, Zooming is visually similar to Dollying in or out of the scene. But if the factors are large, you need to think about which you want—dollying will cause objects that were right in front of you to move past you, but zooming will change the perspective effect in the scene and might be disconcerting.
If there is no Camera set up already in the segment, Zoom_Camera() will create a default camera (-1 to +1, etc.), then zoom it. The owning segment's camera is ignored, so it's advisable to always do your camera work in the same segment.