## Index of OpenRM - RM Library

     RMstate *rmStateNew (void)

     No arguments.

Create and initialize an RMstate object, meaning that all RMstate matrices are set to the identity. Upon success, a handle to the new RMstate is returned to the caller. Otherwise, a NULL pointer is returned to the caller.

librm library source file: rmrstate.c

     void rmStateDelete (RMstate *s)

     RMstate *s - a handle to the RMstate object to delete (modified).

Frees the resources for an RMstate object. No error checking is performed, so the result of deleting a non-object will be system-dependent (generllay this is something to avoid).

No status is returned.

librm library source file: rmrstate.c

     void rmStateCopy (const RMstate *s,
                       RMstate *d)

     const RMstate *s - a handle to the source RMstate (input).

     RMstate *d - a handle to the destination RMstate (modified).

Copies the RMstate object s to the RMstate object d. No error checking is performed, so the copy is only valid if s and d are valid RMstate objects.

No status is returned.

librm library source file: rmrstate.c

     const RMmatrix *rmStateGetModelViewMatrix (const RMstate *toQuery)

     const RMstate *toQuery - a handle to an RMstate object (input).

During a render-time traversal, the RMstate object reflects the current state of many rendering parameters as affected by nodes in the scene graph. The RMstate object is provided to node callback functions as a parameter. The rmStateGet*() family of routines can be used by developers to obtain current render state parameters.

This routine is used to obtain a handle to the OpenGL "model-view" matrix. The modelView matrix is the concatenation of model transformations with the view transformation defined by the current camera.

The RMmatrix handle that is returned is "read only." NULL is returned if the input RMstate object is NULL.

librm library source file: rmrstate.c

     const RMmatrix *rmStateGetProjectionMatrix (const RMstate *toQuery)

     const RMstate *toQuery - a handle to an RMstate object (input).

During a render-time traversal, the RMstate object reflects the current state of many rendering parameters as affected by nodes in the scene graph. The RMstate object is provided to node callback functions as a parameter. The rmStateGet*() family of routines can be used by developers to obtain current render state parameters.

This routine is used to obtain a handle to the OpenGL "projection" matrix. The projection matrix represents the transformation from eye coordinates to clip coordinates, typically defined only by 3D cameras.

The RMmatrix handle that is returned is "read only." NULL is returned if the input RMstate object is NULL.

librm library source file: rmrstate.c

     RMenum rmStateGetShader(const RMstate *toQuery)

     const RMstate *toQuery - a handle to an RMstate object (input).

Use this routine to obtain the shader attribute of an RMstate object. Upon success, one of the RM shade model enumerators is returned to the caller (RM_SHADER_SMOOTH, RM_SHADER_FLAT or RM_SHADER_NOLIGHT). Otherwise, RM_WHACKED is returned.

This routine is intended to be used from inside application callback code, either node callbacks or application-defined RMprimitive draw routines.

librm library source file: rmrstate.c

     RMenum rmStateGetPolygonDrawMode(const RMstate *toQuery,
    		                  RMenum *whichFaceReturn,
    				  RMenum *drawModeReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     RMenum *whichFaceReturn, *drawModeReturn - handles to caller-supplied
        RMenum's (result). A value of NULL is acceptable.

Use this routine to query the render-time values for the polygon draw mode. See rmNodeSetPolygonDrawMode() for more details about these parameters. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

If the caller specifies NULL for one of the return parameters, that value will not be queried.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     RMenum rmStateGetPolygonCullMode(const RMstate *toQuery,
    				  RMenum *cullModeReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     RMenum *cullModeReturn - handles to caller-supplied
        RMenum's (result). A value of NULL is acceptable.

Use this routine to query the render-time values for the polygon cull mode. See rmNodeSetPolygonCullMode() for more details about this parameter. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

If the caller specifies NULL for the return parameter, the polygon cull mode from the RMstate object will not be copied into caller-supplied memory.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     RMenum rmStateGetFrontFace(const RMstate *toQuery,
    		            RMenum *frontFaceReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     RMenum *frontFaceReturn - a handle to a caller-supplied RMenum (result).

Use this routine to query the render-time values for the polygon front face attribute. See rmNodeSetFrontFace() for more details about this parameter. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

If the caller specifies NULL for the return parameter, the polygon front face mode from the RMstate object will not be copied into caller-supplied memory.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     RMenum rmStateGetLineWidth(const RMstate *toQuery,
    		            RMenum *lineWidthReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     RMenum *lineStyleReturn - a handle to a caller-supplied RMenum (result).

Use this routine to query the render-time values for the current line style attribute. See rmNodeSetLineWidth() for more details about this parameter. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

Note that an RM line width enumerator is returned, not the actual pixel width of the lines.

If the caller specifies NULL for the return parameter, the line style attribute from the RMstate object will not be copied into caller-supplied memory.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     RMenum rmStateGetLineStyle(const RMstate *toQuery,
    		            RMenum *lineStyleReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     RMenum *lineStyleReturn - a handle to a caller-supplied RMenum (result).

Use this routine to query the render-time values for the current line style attribute. See rmNodeSetLineStyle() for more details about this parameter. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

If the caller specifies NULL for the return parameter, the line style attribute from the RMstate object will not be copied into caller-supplied memory.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     RMenum rmStateGetPointSize(const RMstate *toQuery,
    		            float *sizeReturn)

     const RMstate *toQuery - a handle to an RMnode (input).
     float *sizeReturn - a handle to a caller-supplied float (result).

Use this routine to query the render-time values for the current point size attribute. See rmNodeSetPointSize() for more details about this parameter. This routine is intended to be used from inside an application callback that would be attached to an RMnode, to be invoked during a render-time traversal of the scene graph.

If the caller specifies NULL for the return parameter, the point size attribute from the RMstate object will not be copied into caller-supplied memory.

RM_CHILL is returned upon success. Upon failure, RM_WHACKED is returned, and caller supplied memory remains unmodified.

librm library source file: rmrstate.c

     int rmStateGetFrameNumber(const RMstate *toQuery)

     const RMstate *toQuery - a handle to an RMstate object.

Use this routine to query the render-time frame number from the RMstate object "toQuery." This routine is intended to be used by application- supplied render- or view-traversal callback routines in order to implement operations that are a function of the current frame number.

librm library source file: rmrstate.c