Functions



Q3Camera_GetData


( TQ3Status ) Q3Camera_GetData (
    TQ3CameraObject camera,
    TQ3CameraData *cameraData
);
Discussion

Get the common state of a camera.

Parameter Descriptions
camera
The camera to query.
cameraData
Receives the common state of the camera.
function result
Success or failure of the operation.

Q3Camera_GetPlacement


( TQ3Status ) Q3Camera_GetPlacement (
    TQ3CameraObject camera,
    TQ3CameraPlacement *placement
);
Discussion

Get the placement of a camera.

Parameter Descriptions
camera
The camera to query.
placement
Receives the placement of the camera.
function result
Success or failure of the operation.

Q3Camera_GetRange


( TQ3Status ) Q3Camera_GetRange (
    TQ3CameraObject camera,
    TQ3CameraRange *range
);
Discussion

Get the range of a camera.

Parameter Descriptions
camera
The camera to query.
range
Receives the range of the camera.
function result
Success or failure of the operation.

Q3Camera_GetType


( TQ3ObjectType ) Q3Camera_GetType (
    TQ3CameraObject camera
);
Discussion

Get the type of a camera.

Returns kQ3CameraTypeOrthographic, kQ3CameraTypeViewAngleAspect, or kQ3CameraTypeViewPlane. Returns kQ3ObjectTypeInvalid if the camera type is unknown.

Parameter Descriptions
camera
The camera to query.
function result
The type of the camera object.

Q3Camera_GetViewPort


( TQ3Status ) Q3Camera_GetViewPort (
    TQ3CameraObject camera,
    TQ3CameraViewPort *viewPort
);
Discussion

Get the view port of a camera.

Parameter Descriptions
camera
The camera to query.
viewPort
Receives the view port of the camera.
function result
Success or failure of the operation.

Q3Camera_GetViewToFrustum


( TQ3Status ) Q3Camera_GetViewToFrustum (
    TQ3CameraObject camera,
    TQ3Matrix4x4 *viewToFrustum
);
Discussion

Get the view-to-frustum matrix of a camera.

The view-to-frustum matrix transforms the camera coordinate system (as returned by Q3Camera_GetWorldToView) to the viewing frustum coordinate system.

The frustum coordinate system ranges from 0.0 to -1.0 in z, and from -1.0 to +1.0 in both x and y.

Parameter Descriptions
camera
The camera to query.
viewToFrustum
Receives the view-to-frustum matrix of the camera.
function result
Success or failure of the operation.

Q3Camera_GetWorldToFrustum


( TQ3Status ) Q3Camera_GetWorldToFrustum (
    TQ3CameraObject camera,
    TQ3Matrix4x4 *worldToFrustum
);
Discussion

Get the world-to-frustum matrix of a camera.

The world-to-frustum matrix transforms world coordinates to the viewing frustum coordinate system. It is equivalent to multiplying the matrices returned by Q3Camera_GetWorldToView and Q3Camera_GetViewToFrustum. See the documentation of Q3View_GetWorldToFrustumMatrixState for more information.

Parameter Descriptions
camera
The camera to query.
worldToFrustum
Receives the world-to-frustum matrix of the camera.
function result
Success or failure of the operation.

Q3Camera_GetWorldToView


( TQ3Status ) Q3Camera_GetWorldToView (
    TQ3CameraObject camera,
    TQ3Matrix4x4 *worldToView
);
Discussion

Get the world-to-view matrix of a camera.

The world-to-view matrix transforms world coordinates to a coordinate system relative to the camera. The origin of this coordinate system is the camera location, with the camera view pointing down the -z axis and the camera up vector placed along the +y axis.

Parameter Descriptions
camera
The camera to query.
worldToView
Receives the world-to-view matrix of the camera.
function result
Success or failure of the operation.

Q3Camera_SetData


( TQ3Status ) Q3Camera_SetData (
    TQ3CameraObject camera,
    const TQ3CameraData *cameraData
);
Discussion

Set the common state for a camera.

Parameter Descriptions
camera
The camera to update.
cameraData
The new common state for the camera.
function result
Success or failure of the operation.

Q3Camera_SetPlacement


( TQ3Status ) Q3Camera_SetPlacement (
    TQ3CameraObject camera,
    const TQ3CameraPlacement *placement
);
Discussion

Set the placement for a camera.

Parameter Descriptions
camera
The camera to update.
placement
The new placement for the camera.
function result
Success or failure of the operation.

Q3Camera_SetRange


( TQ3Status ) Q3Camera_SetRange (
    TQ3CameraObject camera,
    const TQ3CameraRange *range
);
Discussion

Set the range for a camera.

Parameter Descriptions
camera
The camera to update.
range
The new range for the camera.
function result
Success or failure of the operation.

Q3Camera_SetViewPort


( TQ3Status ) Q3Camera_SetViewPort (
    TQ3CameraObject camera,
    const TQ3CameraViewPort *viewPort
);
Discussion

Set the view port for a camera.

Parameter Descriptions
camera
The camera to update.
viewPort
The new view port for the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_GetBottom


( TQ3Status ) Q3OrthographicCamera_GetBottom (
    TQ3CameraObject camera,
    float *bottom
);
Discussion

Get the bottom side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to query.
bottom
Receives the bottom side of the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_GetData


( TQ3Status ) Q3OrthographicCamera_GetData (
    TQ3CameraObject camera,
    TQ3OrthographicCameraData *cameraData
);
Discussion

Get the data for an orthographic camera.

Parameter Descriptions
camera
The camera to query.
cameraData
Receives the data of the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_GetLeft


( TQ3Status ) Q3OrthographicCamera_GetLeft (
    TQ3CameraObject camera,
    float *left
);
Discussion

Get the left side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to query.
left
Receives the left side of the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_GetRight


( TQ3Status ) Q3OrthographicCamera_GetRight (
    TQ3CameraObject camera,
    float *right
);
Discussion

Get the right side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to query.
right
Receives the right side of the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_GetTop


( TQ3Status ) Q3OrthographicCamera_GetTop (
    TQ3CameraObject camera,
    float *top
);
Discussion

Get the top side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to query.
top
Receives the top side of the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_New


( TQ3CameraObject ) Q3OrthographicCamera_New (
    const TQ3OrthographicCameraData *orthographicData
);
Discussion

Create a new orthographic camera object.

Parameter Descriptions
orthographicData
The data for the camera object.
function result
The new camera object.

Q3OrthographicCamera_SetBottom


( TQ3Status ) Q3OrthographicCamera_SetBottom (
    TQ3CameraObject camera,
    float bottom
);
Discussion

Set the bottom side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to update.
bottom
The new bottom side for the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_SetData


( TQ3Status ) Q3OrthographicCamera_SetData (
    TQ3CameraObject camera,
    const TQ3OrthographicCameraData *cameraData
);
Discussion

Set the data for an orthographic camera.

Parameter Descriptions
camera
The camera to update.
cameraData
The new data for the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_SetLeft


( TQ3Status ) Q3OrthographicCamera_SetLeft (
    TQ3CameraObject camera,
    float left
);
Discussion

Set the left side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to update.
left
The new left side for the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_SetRight


( TQ3Status ) Q3OrthographicCamera_SetRight (
    TQ3CameraObject camera,
    float right
);
Discussion

Set the right side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to update.
right
The new right side for the camera.
function result
Success or failure of the operation.

Q3OrthographicCamera_SetTop


( TQ3Status ) Q3OrthographicCamera_SetTop (
    TQ3CameraObject camera,
    float top
);
Discussion

Set the top side of the viewing frustum of an orthographic camera.

Parameter Descriptions
camera
The camera to update.
top
The new top side for the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_GetAspectRatio


( TQ3Status ) Q3ViewAngleAspectCamera_GetAspectRatio (
    TQ3CameraObject camera,
    float *aspectRatioXToY
);
Discussion

Get the aspect ratio of a view angle aspect camera.

If the aspect ratio is greater than 1.0, the field of view of the camera is vertical. If it is less than 1.0, the field of view is horizontal.

Parameter Descriptions
camera
The camera to query.
aspectRatioXToY
Receives the horizontal-to-vertical aspect ratio of the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_GetData


( TQ3Status ) Q3ViewAngleAspectCamera_GetData (
    TQ3CameraObject camera,
    TQ3ViewAngleAspectCameraData *cameraData
);
Discussion

Get the data for a view angle aspect camera.

Parameter Descriptions
camera
The camera to query.
cameraData
Receives the data of the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_GetFOV


( TQ3Status ) Q3ViewAngleAspectCamera_GetFOV (
    TQ3CameraObject camera,
    float *fov
);
Discussion

Get the field of view of a view angle aspect camera.

The field of view is specified in radians.

Parameter Descriptions
camera
The camera to query.
fov
Receives the field of view of the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_New


( TQ3CameraObject ) Q3ViewAngleAspectCamera_New (
    const TQ3ViewAngleAspectCameraData *cameraData
);
Discussion

Create a new view angle aspect camera object.

Parameter Descriptions
cameraData
The data for the camera object.
function result
The new camera object.

Q3ViewAngleAspectCamera_SetAspectRatio


( TQ3Status ) Q3ViewAngleAspectCamera_SetAspectRatio (
    TQ3CameraObject camera,
    float aspectRatioXToY
);
Discussion

Set the aspect ratio for a view angle aspect camera.

If the aspect ratio is greater than 1.0, the field of view of the camera is vertical. If it is less than 1.0, the field of view is horizontal.

Parameter Descriptions
camera
The camera to update.
aspectRatioXToY
The new horizontal-to-vertical aspect ratio of the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_SetData


( TQ3Status ) Q3ViewAngleAspectCamera_SetData (
    TQ3CameraObject camera,
    const TQ3ViewAngleAspectCameraData *cameraData
);
Discussion

Set the data for a view angle aspect camera.

Parameter Descriptions
camera
The camera to update.
cameraData
The new data for the camera.
function result
Success or failure of the operation.

Q3ViewAngleAspectCamera_SetFOV


( TQ3Status ) Q3ViewAngleAspectCamera_SetFOV (
    TQ3CameraObject camera,
    float fov
);
Discussion

Set the field of view for a view angle aspect camera.

The field of view is specified in radians.

Parameter Descriptions
camera
The camera to update.
fov
The new field of view for the camera.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetCenterX


( TQ3Status ) Q3ViewPlaneCamera_GetCenterX (
    TQ3CameraObject camera,
    float *centerXOnViewPlane
);
Discussion

Get the x coordinate of the view rectangle center of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose origin in x is at the returned coordinate.

Parameter Descriptions
camera
The camera to query.
centerXOnViewPlane
Receives the x coordinate of the center of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetCenterY


( TQ3Status ) Q3ViewPlaneCamera_GetCenterY (
    TQ3CameraObject camera,
    float *centerYOnViewPlane
);
Discussion

Get the y coordinate of the view rectangle center of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose origin in y is at the returned coordinate.

Parameter Descriptions
camera
The camera to query.
centerYOnViewPlane
Receives the y coordinate of the center of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetData


( TQ3Status ) Q3ViewPlaneCamera_GetData (
    TQ3CameraObject camera,
    TQ3ViewPlaneCameraData *cameraData
);
Discussion

Get the data for a view plane camera.

Parameter Descriptions
camera
The camera to query.
cameraData
Receives the data of the camera.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetHalfHeight


( TQ3Status ) Q3ViewPlaneCamera_GetHalfHeight (
    TQ3CameraObject camera,
    float *halfHeightAtViewPlane
);
Discussion

Get the half-height of the view rectangle of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose height is twice the returned half-height.

Parameter Descriptions
camera
The camera to query.
halfHeightAtViewPlane
Receives the half-height of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetHalfWidth


( TQ3Status ) Q3ViewPlaneCamera_GetHalfWidth (
    TQ3CameraObject camera,
    float *halfWidthAtViewPlane
);
Discussion

Get the half-width of the view rectangle of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose width is twice the returned half-width.

Parameter Descriptions
camera
The camera to query.
halfWidthAtViewPlane
Receives the half-width of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_GetViewPlane


( TQ3Status ) Q3ViewPlaneCamera_GetViewPlane (
    TQ3CameraObject camera,
    float *viewPlane
);
Discussion

Get the view plane distance of a view plane camera.

The view plane distance is the distance along the camera view vector from the camera location.

Parameter Descriptions
camera
The camera to query.
viewPlane
Receives the view plane distance of the camera.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_New


( TQ3CameraObject ) Q3ViewPlaneCamera_New (
    const TQ3ViewPlaneCameraData *cameraData
);
Discussion

Create a new view plane camera object.

Parameter Descriptions
cameraData
The data for the camera object.
function result
The new camera object.

Q3ViewPlaneCamera_SetCenterX


( TQ3Status ) Q3ViewPlaneCamera_SetCenterX (
    TQ3CameraObject camera,
    float centerXOnViewPlane
);
Discussion

Set the x coordinate of the view rectangle center of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose origin in x is at the specified coordinate.

Parameter Descriptions
camera
The camera to update.
centerXOnViewPlane
The new x coordinate for the center of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_SetCenterY


( TQ3Status ) Q3ViewPlaneCamera_SetCenterY (
    TQ3CameraObject camera,
    float centerYOnViewPlane
);
Discussion

Set the y coordinate of the view rectangle center of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose origin in y is at the specified coordinate.

Parameter Descriptions
camera
The camera to update.
centerYOnViewPlane
The new y coordinate for the center of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_SetData


( TQ3Status ) Q3ViewPlaneCamera_SetData (
    TQ3CameraObject camera,
    const TQ3ViewPlaneCameraData *cameraData
);
Discussion

Set the data for a view plane camera.

Parameter Descriptions
camera
The camera to update.
cameraData
The new data for the camera.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_SetHalfHeight


( TQ3Status ) Q3ViewPlaneCamera_SetHalfHeight (
    TQ3CameraObject camera,
    float halfHeightAtViewPlane
);
Discussion

Set the half-height of the view rectangle of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose height is twice the specified half-height.

Parameter Descriptions
camera
The camera to update.
halfHeightAtViewPlane
The new half-height of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_SetHalfWidth


( TQ3Status ) Q3ViewPlaneCamera_SetHalfWidth (
    TQ3CameraObject camera,
    float halfWidthAtViewPlane
);
Discussion

Set the half-width of the view rectangle of a view plane camera.

The area of the view plane which will be rendered is a rectangle, whose width is twice the specified half-width.

Parameter Descriptions
camera
The camera to update.
halfWidthAtViewPlane
The new half-width of the view rectangle.
function result
Success or failure of the operation.

Q3ViewPlaneCamera_SetViewPlane


( TQ3Status ) Q3ViewPlaneCamera_SetViewPlane (
    TQ3CameraObject camera,
    float viewPlane
);
Discussion

Set the view plane distance for a view plane camera.

The view plane distance is the distance along the camera view vector from the camera location.

Parameter Descriptions
camera
The camera to update.
viewPlane
The new view plane distance for the camera.
function result
Success or failure of the operation.

© 1999-2008 Quesa Developers (Last Updated 5/10/2008)