Brief Index      Full Index      Events Index      I.M. Reference

Orbit_Camera


Functions

void Orbit_Camera (double theta, double phi)

Function Documentation

void Orbit_Camera ( double  theta,
double  phi 
)

Walks the viewer's point of view around the object being looked at.

Parameters:
theta - The distance, in degrees, that the camera should "walk around" the target to the right. Can be negative.
phi - The distance, in degrees, that the camera should float up and over the target. Can be negative.

DETAILS

Once you've established a point of view, with Set_Camera_Position() and Set_Camera_Target() , or with Set_Camera_By_Volume() , there are various routines provided to adjust that viewpoint. Orbit_Camera() gives the effect of circling around what you're looking at.

A positive q moves the camera to its right; the scene appears to rotate to the left. To go the other way, use a negative angle. A positive f moves the camera up and over the target; the scene appears to be tilting downwards. A negative f moves the camera downwards. If both q and f are specified, the left-right motion is performed first, and then the up-down motion. A full orbit of 360 degrees leaves you back where you started, and the axis of the rotation is always the current camera Up Vector. (If you'd like to "orbit" some arbitrary axis call Roll_Camera() , then Orbit_Camera() , then Roll_Camera() back again.)

The Orbit always works in terms of the current position of the camera. When the Orbit is done the camera Position will have a new value and the Up Vector may have a new value (if f is non-zero.) The next time Orbit (or Pan, Dolly, or Roll) is called, the motion starts from the new position.

NOTES

If there is no Camera set up already in the segment, Orbit_Camera() will create a default camera (-1 to +1, etc.) and then orbit it. The owning segment's camera is ignored, so it's advisable to always do your camera work in the same segment.

RESTRICTIONS

See also:
Set_Camera or Set_Camera_By_Volume, Set_Camera_Field, Set_Camera_Position, Set_Camera_Projection, Set_Camera_Target, Set_Camera_Up_Vector, Zoom_Camera, Dolly_Camera, Pan_Camera, Roll_Camera, Set_Window, Translate_Object, Rotate_Object.

Brief Index      Full Index      Events Index      I.M. Reference