Set_Camera

Functions

void DSet_Camera (const HCD_POINT *position, const HCD_POINT *target, const HCD_POINT *up, double width, double height, const char *projection)
 Similar to Set_Camera(), but operates on double-precision parameter values. More...
 
void Set_Camera (const HC_POINT *position, const HC_POINT *target, const HC_VECTOR *up, double width, double height, const char *projection)
 Allows the complete specification of the viewing camera's position, orientation, and field of view. More...
 
void UnSet_Camera (void)
 Removes all settings established by a previous call to Set_Camera(). More...
 

Detailed Description

Function Documentation

◆ DSet_Camera()

void DSet_Camera ( const HCD_POINT *  position,
const HCD_POINT *  target,
const HCD_POINT *  up,
double  width,
double  height,
const char *  projection 
)

Similar to Set_Camera(), but operates on double-precision parameter values.

Parameters
position- Position in the scene, in user coordinates, at which to set up the camera. Passed by reference in all languages.
target- Coordinates in the scene at which to point the camera. Passed by reference in all languages.
up- Direction the top of the camera should face; the "upvec tor". Passed by reference in all languages.
width- Width of the minimum area around the target to be visible.
height- Height of the minimum area around the target to be visible.
projection- Special constant—either "Perspective", "Orthographic", "Stretched", or an "oblique" form (see Set_Camera_Projection() or Set_Camera_By_Volume() ). May be uppercase, lowe case, or mixed case.

◆ Set_Camera()

void Set_Camera ( const HC_POINT *  position,
const HC_POINT *  target,
const HC_VECTOR *  up,
double  width,
double  height,
const char *  projection 
)

Allows the complete specification of the viewing camera's position, orientation, and field of view.

Parameters
position- Position in the scene, in user coordinates, at which to set up the camera. Passed by reference in all languages.
target- Coordinates in the scene at which to point the camera. Passed by reference in all languages.
up- Direction the top of the camera should face; the "up vector". Passed by reference in all languages.
width- Width of the minimum area around the target to be visible.
height- Height of the minimum area around the target to be visible.
projection- Special constant—either "Perspective", "Orthographic", "Stretched", or an "oblique" form (see Set_Camera_Projection() or Set_Camera_By_Volume() ). May be uppercase, lowe case, or mixed case.

DETAILS

The "Camera" attribute is the generic attribute underlying Set_Camera_Position() , Set_Camera_Target() , Set_Camera_Up_Vector() , Set_Camera_Field() , and Set_Camera_Projection() . Those routines function by inquiring the details on the current camera, changing the single item of interest, and calling back to Set_Camera() to load everything back in. Set_Camera() would normally only be called directly if your program were keeping track of all the details of the camera, and you wanted to ensure that your program's opinion and the system's completely matched.

NOTES

The field is stored as an angular field-of-view immediately upon receipt, and is held constant as an angle through subsequent camera movements. This keeps your lens from accidentally turning itself into a fish-eye as you walk up to your target.
If up is not already perpendicular to the specified line of sight, the nearest vector that is perpendicular is computed.
If the camera position is right on top of the camera target, or if the up vector is colinear with the line of sight, or if it is all zeroes, your camera setting isn't reasonable and errors are reported right away. (Since you've told the system about the camera all at once, the system doesn't bother to wait till Update time in the hopes that something will change. The individual routines—Set Position, Set Target, and Set Up Vectorwill wait around.)
For historical reasons the words for the regular projections can be abbreviated. The oblique projections cannot be abbreviated.

RESTRICTIONS

The same camera must be in effect for light sources, for objects upon which the light falls, and for the window in which the lights and objects reside. (If one needs to rotate the lights with respect to the objects within the scene, or vice versa, Rotate_Object() rather than Orbit_Camera() should be used.)

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

◆ UnSet_Camera()

void UnSet_Camera ( void  )

Removes all settings established by a previous call to Set_Camera().

DETAILS

No additional details. See Set_Camera()