Index of OpenRM - RM Library


 RMclipPlane * rmClipPlaneNew (void)
 no arguments.

Creates a new RMclipPlane object, returning a handle to the new RMclipPlane object upon success, or NULL upon failure.

The new RMclipPlane object is initialized with the following default values:

1. The RMclipPlane object is disabled.

2. Default point: (RM_DEFAULT_CLIP_PLANE_POINT) {0.,0.,0.}

3. Default normal: (RM_DEFAULT_CLIP_PLANE_NORMAL) {0., 0., -1.}

Applications should use rmClipPlaneDelete to release resources associated with the RMclipPlane object when no longer needed.

To have the clip plane used during rendering, it needs to be activated (rmClipPlaneEnable), assigned whatever values you want for the point and normal attributes (normalized normals, please) and then assigned as a scene parameter to an RMnode with rmNodeSetSceneClipPlane.

librm library source file: rmclip.c

 RMenum rmClipPlaneDelete (RMclipPlane *toDelete)
 RMclipPlane *toDelete - a handle to the RMclipPlane object to be
    deleted. 

This routine releases RMclipPlane resources, the opposite of rmClipPlaneNew.

Upon success, RM_CHILL is returned and the rmclipPlance has been deleted. Otherwise, RM_WHACKED is returned.

librm library source file: rmclip.c

 RMenum rmClipPlaneSetPointNormal (RMclipPlane *toModify,
			           const RMvertex3D *point,
				   const RMvertex3D *normal)
 RMclipPlane *toModify - a handle to an RMclipPlane object that will
    be modified (input and result).
 RMvertex3D *point - a handle to a caller supplied RMvertex3D object.
    The contents of the caller's "point" value will be copied into the
    RMclipPlane's "point" attribute.
 RMvertex3D *normal - a handle to a caller supplied RMvertex3D object.
    The contents of the caller's "normal" value will be copied into
    the RMclipPlane's "normal" attribute.

A clipping plane in OpenRM is defined with two parameters, a 3D point and a normal.

Use this routine to set these parameters in an RMclipPlane object.

librm library source file: rmclip.c

 RMenum rmClipPlaneGetPointNormal (const RMclipPlane *toQuery,
			           RMvertex3D *point,
				   RMvertex3D *normal)
 const RMclipPlane *toQuery - a handle to an RMclipPlane object that
    will be queried (input).
 RMvertex3D *point - a handle to a caller supplied RMvertex3D object.
    The RMclipPlane's "point" attribute will be copied into this
    object (result).
 RMvertex3D *normal - a handle to a caller supplied RMvertex3D object.
    The RMclipPlane's "normal" attribute will be copied into this
    object (result). 

A clipping plane in OpenRM is defined with two parameters, a 3D point and a normal.

Use this routine to obtain these parameters from an RMclipPlane object.

librm library source file: rmclip.c

 RMenum rmClipPlaneEnable (RMclipPlane *toModify)
 RMclipPlane *toModify - a handle to an RMclipPlane object. This
    object will be modified by this routine.

Use this routine to "turn on" a clipping plane.

Clipping planes are scene parameters assigned to RMnodes. Upon assignment, OpenRM makes a copy of the caller-supplied RMclipPlane object. Any application changes to the RMclipPlane object do not affect the copy of the RMclipPlane at the RMnode: after making changes, the RMclipPlane object must be reassigned to the RMnode as a scene parameter (see rmNodeSetSceneClipPlane()). Therefore, if the application maintains it's own internal array of clipping planes, any changes to the application RMclipPlane objects should be propogated to OpenRM with rmNodeSetSceneClipPlane, including deactivation.

See also rmClipPlaneNew().

librm library source file: rmclip.c

 RMenum rmClipPlaneDisable (RMclipPlane *toModify)
 RMclipPlane *toModify - a handle to an RMclipPlane object. This
    object will be modified by this routine. 

Use this routine to "turn off" a clipping plane.

Clipping planes are scene parameters assigned to RMnodes. Upon assignment, OpenRM makes a copy of the caller-supplied RMclipPlane object. Any application changes to the RMclipPlane object do not affect the copy of the RMclipPlane at the RMnode: after making changes, the RMclipPlane object must be reassigned to the RMnode as a scene parameter (see rmNodeSetSceneClipPlane()). Therefore, if the application maintains it's own internal array of clipping planes, any changes to the application RMclipPlane objects should be propogated to OpenRM with rmNodeSetSceneClipPlane, including deactivation.

Applications may deactivate a clip plane by either 1. calling this routine to set an RMclipPlane's active attribute to "off" and then propogating the modified RMclipPlane to a scene graph node with rmNodeSetSceneClipPlane, or 2. by removing the clip plane from a scene graph node by calling rmNodeSetSceneClipPlane with NULL as the value for the RMclipPlane parameter.

librm library source file: rmclip.c

 RMenum rmClipPlaneIsEnabled (const RMclipPlane *toQuery)
 const RMclipPlane *toQuery

This routine is will return to the caller RM_TRUE if the RMclipPlane object is "enabled", or RM_FALSE if the RMclipPlane object is disabled. RM_WHACKED is returned if the RMclipPlane object is NULL.

librm library source file: rmclip.c