PEXOCCSetModelClipVolume - Set Model Clip Volume 3D (5.0)


Synopsis

   void PEXOCCSetModelClipVolume(
        PEXOCC context,
        int op,
        unsigned int count,
        PEXHalfSpace *half_spaces
   )

 
   void PEXSetModelClipVolume(
        Display *display,
        XID resource_id,
        PEXOCRequestType req_type,
        int op,
        unsigned int count,
        PEXHalfSpace *half_spaces
   )
 

Arguments

context
An OC context returned by a successful PEXCreateOCC call.

display (OCC)
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id (OCC)
The resource identifier of the renderer or structure.

req_type (OCC)
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

op
The model clipping volume operator (PEXModelClipReplace or PEXModelClipIntersection).

count
The number of half-spaces.

half_spaces
An array of points and normal vectors defining the model clipping volume.

Returns

None.

Description

Invoke PEXOCCSetModelClipVolume to create an attribute output command which sets the model clip volume attribute in the renderer's pipeline state.

Specify the model clipping volume operator (op) to indicate how to combine the specified list of half-spaces with the current model clipping volume to form a new model clipping volume. Primitives outside of the model clipping volume are not rendered when the pipeline's state model clip indicator is PEXClip (see PEXOCCSetModelClipFlag). PEXlib defines two model clipping volume operators (op):

PEXModelClipReplace -
replaces current volume using the specified half-spaces to create a new composite modeling clipping volume. (5.0)

PEXModelClipIntersection -
intersects the specified current composite modeling clipping volume with the current volume (specified by the half-spaces). (5.0)

Each half-space is defined by a point and a normal in model coordinates. The normal points in the direction of the half-space, and the point is considered to be on the plane. If the implementation does not support the specified model clipping volume operator, if any half-space is degenerate, or if modifying the pipeline state's model clipping volume exceeds the maximum number of clipping planes the implementation can support, then the implementation does not modify the pipeline state's current model clipping volume. Inquire the maximum number of model clip planes supported by invoking the PEXGetImpDepConstants function.

The implementation transforms each half-space by the current composite modeling transformation and combines the half-space with the current model clipping volume. The resulting model clipping volume is not affected by subsequent changes to the composite modeling transformation. If you specify no half-spaces, then these missing half-spaces define a volume which is all of modeling coordinate space, effectively performing no modeling clip.

This function is a member of the global attribute set.

Errors

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For an overview and for a list of all output attribute functions, see Output Attribute Functions.