Functions | |
void | Orbit_Camera (double theta, double phi) |
void | DOrbit_Camera (double theta, double phi) |
void Orbit_Camera | ( | double | theta, | |
double | phi | |||
) |
Walks the viewer's point of view around the object being looked at.
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. |
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.
void DOrbit_Camera | ( | double | theta, | |
double | phi | |||
) |
Similar to Orbit_Camera(), but operates on double-precision cameras.
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. |