Functions | |
void | Set_Camera (const HC_POINT *position, const HC_POINT *target, const HC_POINT *up, double width, double height, const char *projection) |
void | DSet_Camera (const HCD_POINT *position, const HCD_POINT *target, const HCD_POINT *up, double width, double height, const char *projection) |
void | UnSet_Camera (void) |
void | QSet_Camera (const char *segment, const HC_POINT *position, const HC_POINT *target, const HC_POINT *up, double width, double height, const char *projection) |
void | QUnSet_Camera (const char *segment) |
void Set_Camera | ( | const HC_POINT * | position, | |
const HC_POINT * | target, | |||
const HC_POINT * | up, | |||
double | width, | |||
double | height, | |||
const char * | projection | |||
) |
Allows the complete specification of the viewing camera's position, orientation, and field of view.
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. |
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 Vector---will wait around.)
For historical reasons the words for the regular projections can be abbreviated. The oblique projections cannot be abbreviated.
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 accepts double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.
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. |
void UnSet_Camera | ( | void | ) |
Removes all settings established by a previous call to Set_Camera().
void QSet_Camera | ( | const char * | segment, | |
const HC_POINT * | position, | |||
const HC_POINT * | target, | |||
const HC_POINT * | up, | |||
double | width, | |||
double | height, | |||
const char * | projection | |||
) |
Similar to Set_Camera(), but operates on a given segment rather than the currently open one.
segment | - Name of the segment(s) to be changed. | |
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. |
void QUnSet_Camera | ( | const char * | segment | ) |
Removes all settings established by a previous call Set_Camera(), but operates on a given segment rather than the currently open one.
segment | - Name of the segment(s) to be changed. |