Functions



Q3Pop_New


( TQ3StateOperatorObject ) Q3Pop_New (void);
Discussion

Create a pop state operator.

function result
The new pop state operator.

Q3Pop_Submit


( TQ3Status ) Q3Pop_Submit (
    TQ3ViewObject view
);
Discussion

Submit a pop state operator to a view.

Parameter Descriptions
view
The view to submit the state operator to.
function result
Success or failure of the operation.

Q3Push_New


( TQ3StateOperatorObject ) Q3Push_New (void);
Discussion

Create a push state operator.

function result
The new push state operator.

Q3Push_Submit


( TQ3Status ) Q3Push_Submit (
    TQ3ViewObject view
);
Discussion

Submit a push state operator to a view.

Parameter Descriptions
view
The view to submit the state operator to.
function result
Success or failure of the operation.

Q3StateOperator_Submit


( TQ3Status ) Q3StateOperator_Submit (
    TQ3StateOperatorObject stateOperator,
    TQ3ViewObject view
);
Discussion

Submit a state operator to a view.

Parameter Descriptions
stateOperator
The state operator to submit.
view
The view to submit the state operator to.
function result
Success or failure of the operation.

Q3View_AddLight


( TQ3Status ) Q3View_AddLight (
    TQ3ViewObject theView,
    TQ3ObjectType lightType,
    void *lightData
);
Discussion

Add a light to a view's light group.

If the view does not currently posses a light group, a new group will be created.

lightData is assumed to point to the appropriate data structure for lightType. E.g., if lightType is kQ3LightTypeSpot, then lightData is assumed to be a pointer to a TQ3SpotLightData structure.

lightType may also be set to kQ3ShapeTypeLight. In this case lightData is assumed to point to an existing TQ3LightObject (of any type) rather than to the data structure for a specific type of light.

The reference count of the TQ3LightObject will be unaffected, and so the caller must dispose of it to release their reference.

This function is not available in QD3D.

Parameter Descriptions
theView
The view to add the light to.
lightType
The type of data referenced by lightData.
lightData
The data for the light.
function result
Success or failure of the operation.

Q3View_AllowAllGroupCulling


( TQ3Status ) Q3View_AllowAllGroupCulling (
    TQ3ViewObject view,
    TQ3Boolean allowCulling
);
Discussion

Set the group culling state of a view.

If group culling is active, a view will skip groups whose bounding boxes are not visible.

Parameter Descriptions
view
The view to update.
allowCulling
The new group culling state for the view.
function result
Success or failure of the operation.

Q3View_Cancel


( TQ3Status ) Q3View_Cancel (
    TQ3ViewObject view
);
Discussion

Cancel a submit loop.

Parameter Descriptions
view
The view being submitted to.
function result
Success or failure of the operation.

Q3View_EndBoundingBox


( TQ3ViewStatus ) Q3View_EndBoundingBox (
    TQ3ViewObject view,
    TQ3BoundingBox *theBounds
);
Discussion

End a bounding loop.

Parameter Descriptions
view
The view being bounded to.
theBounds
Bounding box to set to the computed bounds.
function result
Result of the bounding pass. Note that the result is a TQ3ViewStatus, not a TQ3Status. Be sure to watch for kQ3ViewStatusRetraverse, and repeat the submit loop in that case.

Q3View_EndBoundingSphere


( TQ3ViewStatus ) Q3View_EndBoundingSphere (
    TQ3ViewObject view,
    TQ3BoundingSphere *theBounds
);
Discussion

End a bounding loop.

Parameter Descriptions
view
The view being bounded to.
theBounds
Bounding sphere to set to the computed bounds.
function result
Result of the bounding pass. Note that the result is a TQ3ViewStatus, not a TQ3Status. Be sure to watch for kQ3ViewStatusRetraverse, and repeat the submit loop in that case.

Q3View_EndPicking


( TQ3ViewStatus ) Q3View_EndPicking (
    TQ3ViewObject view
);
Discussion

End a picking loop.

Parameter Descriptions
view
The view being picked to.
function result
Result of the picking pass. Note that the result is a TQ3ViewStatus, not a TQ3Status. Be sure to watch for kQ3ViewStatusRetraverse, and repeat the submit loop in that case.

Q3View_EndRendering


( TQ3ViewStatus ) Q3View_EndRendering (
    TQ3ViewObject view
);
Discussion

End a rendering loop.

Parameter Descriptions
view
The view being rendered to.
function result
Result of the rendering pass. Note that the result is a TQ3ViewStatus, not a TQ3Status. Be sure to watch for kQ3ViewStatusRetraverse, and repeat the submit loop in that case.

Q3View_Flush


( TQ3Status ) Q3View_Flush (
    TQ3ViewObject view
);
Discussion

Flush the output from within a rendering loop.

May only be called between a Q3View_StartRendering/Q3View_EndRendering sequence. May or may not update the draw context - behaviour is renderer-dependent.

Parameter Descriptions
view
The view to flush.
function result
Success or failure of the operation.

Q3View_GetAntiAliasStyleState


( TQ3Status ) Q3View_GetAntiAliasStyleState (
    TQ3ViewObject view,
    TQ3AntiAliasStyleData *antiAliasData
);
Discussion

Get the current anti-alias style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
antiAliasData
Receives the current anti-alias style state.
function result
Success or failure of the operation.

Q3View_GetAttributeSetState


( TQ3Status ) Q3View_GetAttributeSetState (
    TQ3ViewObject view,
    TQ3AttributeSet *attributeSet
);
Discussion

Get the current attribute state set from a view.

Parameter Descriptions
view
The view to query.
attributeSet
Receives the current attribute state set.
function result
Success or failure of the operation.

Q3View_GetAttributeState


( TQ3Status ) Q3View_GetAttributeState (
    TQ3ViewObject view,
    TQ3AttributeType attributeType,
    void *data
);
Discussion

Get the current state of an attribute from a view.

This function returns a pointer to data within an attribute state representing the current attributes in the view. You should consider the pointer to be read-only and temporary. It is safer and less error-prone to get the attribute set with Q3View_GetAttributeSetState and then extract data with Q3AttributeSet_Get.

Parameter Descriptions
view
The view to query.
attributeType
The attribute type to query.
data
Receives the address of the current value for the specified attribute.
function result
Success or failure of the operation.

Q3View_GetBackfacingStyleState


( TQ3Status ) Q3View_GetBackfacingStyleState (
    TQ3ViewObject view,
    TQ3BackfacingStyle *backfacingStyle
);
Discussion

Get the current backfacing style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
backfacingStyle
Receives the current backfacing style state.
function result
Success or failure of the operation.

Q3View_GetCamera


( TQ3Status ) Q3View_GetCamera (
    TQ3ViewObject view,
    TQ3CameraObject *camera
);
Discussion

Get the camera from a view.

The reference count of the camera is incremented.

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

Q3View_GetCastShadowsStyleState


( TQ3Status ) Q3View_GetCastShadowsStyleState (
    TQ3ViewObject view,
    TQ3Boolean *castShadows
);
Discussion

Get the current cast shadows style state from a view. Must be called within a submitting loop.

This function is not available in QD3D.

Parameter Descriptions
view
The view to query.
castShadows
Receives the current cast shadows style state.
function result
Success or failure of the operation.

Q3View_GetDefaultAttributeSet


( TQ3Status ) Q3View_GetDefaultAttributeSet (
    TQ3ViewObject view,
    TQ3AttributeSet *attributeSet
);
Discussion

Get the default attribute set from a view.

The reference count of the attribute set is incremented.

Parameter Descriptions
view
The view to query.
attributeSet
Receives the default attribute set.
function result
Success or failure of the operation.

Q3View_GetDrawContext


( TQ3Status ) Q3View_GetDrawContext (
    TQ3ViewObject view,
    TQ3DrawContextObject *drawContext
);
Discussion

Get the draw context from a view.

The reference count of the draw context is incremented.

Parameter Descriptions
view
The view to query.
drawContext
Receives the draw context associated with the view.
function result
Success or failure of the operation.

Q3View_GetFillStyleState


( TQ3Status ) Q3View_GetFillStyleState (
    TQ3ViewObject view,
    TQ3FillStyle *fillStyle
);
Discussion

Get the current fill style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
fillStyle
Receives the current fill style state.
function result
Success or failure of the operation.

Q3View_GetFogStyleState


( TQ3Status ) Q3View_GetFogStyleState (
    TQ3ViewObject view,
    TQ3FogStyleData *fogData
);
Discussion

Get the current fog style associated with a view. Must be called within a submitting loop.

This function is not available in QD3D.

Parameter Descriptions
theView
The view to query.
fogData
Receives the current fog style state.
function result
Success or failure of the operation.

Q3View_GetFrustumToWindowMatrixState


( TQ3Status ) Q3View_GetFrustumToWindowMatrixState (
    TQ3ViewObject view,
    TQ3Matrix4x4 *matrix
);
Discussion

Get the frustum-to-window matrix state from a view. Must be called within a submitting loop.

This matrix may be used (via Q3Point3D_Transform) to transform points from frustum coordinates into window coordinates. See Q3View_GetWorldToFrustumMatrixState for a description of frustum coordinates.

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

Q3View_GetHighlightStyleState


( TQ3Status ) Q3View_GetHighlightStyleState (
    TQ3ViewObject view,
    TQ3AttributeSet *highlightStyle
);
Discussion

Get the current highlight style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
highlightStyle
Receives the current highlight style state.
function result
Success or failure of the operation.

Q3View_GetInterpolationStyleState


( TQ3Status ) Q3View_GetInterpolationStyleState (
    TQ3ViewObject view,
    TQ3InterpolationStyle *interpolationType
);
Discussion

Get the current interpolation style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
interpolationType
Receives the current interpolation style state.
function result
Success or failure of the operation.

Q3View_GetLightGroup


( TQ3Status ) Q3View_GetLightGroup (
    TQ3ViewObject view,
    TQ3GroupObject *lightGroup
);
Discussion

Get the light group from a view.

The reference count of the light group is incremented.

Parameter Descriptions
view
The view to query.
lightGroup
Receives the light group associated with the view.
function result
Success or failure of the operation.

Q3View_GetLocalToWorldMatrixState


( TQ3Status ) Q3View_GetLocalToWorldMatrixState (
    TQ3ViewObject view,
    TQ3Matrix4x4 *matrix
);
Discussion

Get the local-to-world matrix state from a view. Must be called within a submitting loop.

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

Q3View_GetOrientationStyleState


( TQ3Status ) Q3View_GetOrientationStyleState (
    TQ3ViewObject view,
    TQ3OrientationStyle *fontFacingDirectionStyle
);
Discussion

Get the current orientation style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
fontFacingDirectionStyle
Receives the current orientation style state.
function result
Success or failure of the operation.

Q3View_GetPickIDStyleState


( TQ3Status ) Q3View_GetPickIDStyleState (
    TQ3ViewObject view,
    TQ3Uns32 *pickIDStyle
);
Discussion

Get the current pick ID style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
pickIDStyle
Receives the current pick ID style state.
function result
Success or failure of the operation.

Q3View_GetPickPartsStyleState


( TQ3Status ) Q3View_GetPickPartsStyleState (
    TQ3ViewObject view,
    TQ3PickParts *pickPartsStyle
);
Discussion

Get the current pick parts style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
pickPartsStyle
Receives the current pick parts style state.
function result
Success or failure of the operation.

Q3View_GetReceiveShadowsStyleState


( TQ3Status ) Q3View_GetReceiveShadowsStyleState (
    TQ3ViewObject view,
    TQ3Boolean *receiveShadows
);
Discussion

Get the current receive shadows style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
receiveShadows
Receives the current receive shadows style state.
function result
Success or failure of the operation.

Q3View_GetRenderer


( TQ3Status ) Q3View_GetRenderer (
    TQ3ViewObject view,
    TQ3RendererObject *renderer
);
Discussion

Get the renderer from a view.

The reference count of the renderer is incremented.

Parameter Descriptions
view
The view to query.
renderer
Receives the renderer associated with the view.
function result
Success or failure of the operation.

Q3View_GetSubdivisionStyleState


( TQ3Status ) Q3View_GetSubdivisionStyleState (
    TQ3ViewObject view,
    TQ3SubdivisionStyleData *subdivisionStyle
);
Discussion

Get the current subdivision style state from a view. Must be called within a submitting loop.

Parameter Descriptions
view
The view to query.
subdivisionStyle
Receives the current subdivision style state.
function result
Success or failure of the operation.

Q3View_GetWorldToFrustumMatrixState


( TQ3Status ) Q3View_GetWorldToFrustumMatrixState (
    TQ3ViewObject view,
    TQ3Matrix4x4 *matrix
);
Discussion

Get the world-to-frustum matrix state from a view.

This matrix can be used (via Q3Point3D_Transform) to transform points from world coordinates to frustum coordinates. Frustum coordinates specify where a point falls within the viewing frustum. In frustum space, the viewable area ranges in X from -1 (left) to 1 (right); in Y from -1 (bottom) to 1 (top), and in Z from 0 (near clipping plane) to -1 (far clipping plane).

Note that this matrix cannot sensibly transform a point which is at or behind the near clipping plane.

This matrix may be inverted for frustum-to-world transformations.

This function must be called within a submitting loop. If you need this matrix when you are not in a submitting loop, use Q3Camera_GetWorldToFrustum instead.

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

Q3View_IsBoundingBoxVisible


Test a bounding box for visibility.

( TQ3Boolean ) Q3View_IsBoundingBoxVisible (
    TQ3ViewObject view,
    const TQ3BoundingBox *bbox
);
Discussion

The bounding box (assumed to be in local coordinates) is tested for intersection with the view frustum of the camera currently associated with the view.

This function could be used for visibility culling, either in a rendering loop of client code or within a renderer.

Parameter Descriptions
view
The view to check the bounding box against.
bbox
The local bounding box to test.
function result
True or false as the bounding box is visible.

Q3View_New


( TQ3ViewObject ) Q3View_New (void);
Discussion

Create a new view.

function result
The new view object.

Q3View_NewWithDefaults


( TQ3ViewObject ) Q3View_NewWithDefaults (
    TQ3ObjectType drawContextType,
    void *drawContextTarget
);
Discussion

Create a view with a default camera, light group, renderer, and draw context for the specified draw context target.

The draw context type indicates the type of draw context target to create, and implies the following values for drawContextTarget.

kQ3DrawContextTypePixmap => A TQ3Pixmap object. kQ3DrawContextTypeMacintosh => A WindowRef. kQ3DrawContextTypeCocoa => An NSView. kQ3DrawContextTypeWin32DC => An HDC. kQ3DrawContextTypeX11 => A Visual. kQ3DrawContextTypeBe => A BView.

The exact contents of the returned view are not defined, however it should be suitable for interactively rendering objects placed at the origin and will fill the supplied window.

This function is not available in QD3D.

Parameter Descriptions
drawContextType
The type of data referenced by drawContextTarget
drawContextTarget
The window/etc reference for the draw context.
function result
The new view object, or NULL on failure.

Q3View_SetCamera


( TQ3Status ) Q3View_SetCamera (
    TQ3ViewObject view,
    TQ3CameraObject camera
);
Discussion

Set the camera for a view.

The reference count of the camera will be incremented by the view.

Parameter Descriptions
view
The view to update.
camera
The camera to assign to the view.
function result
Success or failure of the operation.

Q3View_SetDefaultAttributeSet


( TQ3Status ) Q3View_SetDefaultAttributeSet (
    TQ3ViewObject view,
    TQ3AttributeSet attributeSet
);
Discussion

Set the default attribute set for a view.

The reference count of the attribute set will be incremented by the view.

Parameter Descriptions
view
The view to update.
attributeSet
The attribute set to assign to the view.
function result
Success or failure of the operation.

Q3View_SetDrawContext


( TQ3Status ) Q3View_SetDrawContext (
    TQ3ViewObject view,
    TQ3DrawContextObject drawContext
);
Discussion

Set the draw context for a view.

The reference count of the draw context will be incremented by the view.

Parameter Descriptions
view
The view to update.
drawContext
The draw context to assign to the view.
function result
Success or failure of the operation.

Q3View_SetEndFrameMethod


( TQ3Status ) Q3View_SetEndFrameMethod (
    TQ3ViewObject view,
    TQ3ViewEndFrameMethod endFrame,
    void *endFrameData
);
Discussion

Set the end frame method for view submit operations.

Parameter Descriptions
view
The view to update.
endFrame
The view end frame callback.
endFrameData
Application-specific data for the callback.
function result
Success or failure of the operation.

Q3View_SetIdleMethod


( TQ3Status ) Q3View_SetIdleMethod (
    TQ3ViewObject view,
    TQ3ViewIdleMethod idleMethod,
    const void *idleData
);
Discussion

Set the idle method for view submit operations.

An idle method can be used to return control to the application periodically during a submit loop.

Parameter Descriptions
view
The view to update.
idleMethod
The view idle callback.
idleData
Application-specific data for the callback.
function result
Success or failure of the operation.

Q3View_SetIdleProgressMethod


( TQ3Status ) Q3View_SetIdleProgressMethod (
    TQ3ViewObject view,
    TQ3ViewIdleProgressMethod idleMethod,
    const void *idleData
);
Discussion

Set the idle progress method for view submit operations.

An idle method can be used to return control to the application periodically during a submit loop.

The idle progress method allows renderers to pass progress information to the application, to update the user interface during a render.

Parameter Descriptions
view
The view to update.
idleMethod
The view idle callback.
idleData
Application-specific data for the callback.
function result
Success or failure of the operation.

Q3View_SetLightGroup


( TQ3Status ) Q3View_SetLightGroup (
    TQ3ViewObject view,
    TQ3GroupObject lightGroup
);
Discussion

Set the light group for a view.

The reference count of the light group will be incremented by the view.

Parameter Descriptions
view
The view to update.
lightGroup
The light group to assign to the view.
function result
Success or failure of the operation.

Q3View_SetRenderer


( TQ3Status ) Q3View_SetRenderer (
    TQ3ViewObject view,
    TQ3RendererObject renderer
);
Discussion

Set the renderer for a view.

The reference count of the renderer will be incremented by the view.

Parameter Descriptions
view
The view to update.
renderer
The renderer to assign to the view.
function result
Success or failure of the operation.

Q3View_SetRendererByType


( TQ3Status ) Q3View_SetRendererByType (
    TQ3ViewObject view,
    TQ3ObjectType theType
);
Discussion

Set the renderer for a view.

The renderer is specified by class type, e.g., kQ3RendererTypeInteractive for the interactive renderer or kQ3RendererTypeWireFrame for the wire-frame renderer.

Parameter Descriptions
view
The view to update.
theType
The type of the renderer to assign to the view.
function result
Success or failure of the operation.

Q3View_StartBoundingBox


( TQ3Status ) Q3View_StartBoundingBox (
    TQ3ViewObject view,
    TQ3ComputeBounds computeBounds
);
Discussion

Start a bounding loop.

Parameter Descriptions
view
The view to start bounding with.
computeBounds
The accuracy of the calculated bounds.
function result
Success or failure of the operation.

Q3View_StartBoundingSphere


( TQ3Status ) Q3View_StartBoundingSphere (
    TQ3ViewObject view,
    TQ3ComputeBounds computeBounds
);
Discussion

Start a bounding loop.

Parameter Descriptions
view
The view to start bounding with.
computeBounds
The accuracy of the calculated bounds.
function result
Success or failure of the operation.

Q3View_StartPicking


( TQ3Status ) Q3View_StartPicking (
    TQ3ViewObject view,
    TQ3PickObject pick
);
Discussion

Start a picking loop.

Parameter Descriptions
view
The view to start picking with.
pick
The pick object for the pick loop.
function result
Success or failure of the operation.

Q3View_StartRendering


( TQ3Status ) Q3View_StartRendering (
    TQ3ViewObject view
);
Discussion

Start a rendering loop.

Parameter Descriptions
view
The view to start rendering with.
function result
Success or failure of the operation.

Q3View_Sync


( TQ3Status ) Q3View_Sync (
    TQ3ViewObject view
);
Discussion

Flush the previous rendering loop to the draw context.

Blocks until the previous rendering loop has updated the draw context. May only be called after a call to Q3View_EndRendering.

Parameter Descriptions
view
The view to sync.
function result
Success or failure of the operation.

Q3View_TransformLocalToWindow


( TQ3Status ) Q3View_TransformLocalToWindow (
    TQ3ViewObject theView,
    const TQ3Point3D *localPoint,
    TQ3Point2D *windowPoint
);
Discussion

Transforms a point from local to window (pixel) coordinates.

May only be called within a view submitting loop.

This function is not available in QD3D.

Parameter Descriptions
theView
The view currently being submitted to.
localPoint
The point to transform, in local coordinates.
windowPoint
The transformed point, in window coordinates.
function result
Success or failure of the operation.

Q3View_TransformLocalToWorld


( TQ3Status ) Q3View_TransformLocalToWorld (
    TQ3ViewObject theView,
    const TQ3Point3D *localPoint,
    TQ3Point3D *worldPoint
);
Discussion

Transforms a point from local to world coordinates.

May only be called within a view submitting loop.

This function is not available in QD3D.

Parameter Descriptions
theView
The view currently being submitted to.
localPoint
The point to transform, in local coordinates.
worldPoint
The transformed point, in world coordinates.
function result
Success or failure of the operation.

Q3View_TransformWorldToWindow


( TQ3Status ) Q3View_TransformWorldToWindow (
    TQ3ViewObject theView,
    const TQ3Point3D *worldPoint,
    TQ3Point2D *windowPoint
);
Discussion

Transforms a point from world to window (pixel) coordinates.

May only be called within a view submitting loop.

This function is not available in QD3D.

Parameter Descriptions
theView
The view currently being submitted to.
worldPoint
The point to transform, in world coordinates.
windowPoint
The transformed point, in window coordinates.
function result
Success or failure of the operation.

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