PEXOCCSetLocalTransform - Set Local Transformation 3D (5.0)


Synopsis

   void PEXOCCSetLocalTransform(
        PEXOCC context,
        int composition,
        PEXMatrix transform,
        PEXMatrixHints hints
   )

   void PEXSetLocalTransform(
        Display *display,
        XID resource_id,
        PEXOCRequestType req_type,
        int composition,
        PEXMatrix transform
   )

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).

composition
The composition rule for combining the new matrix with the current local transform (PEXPreConcatenate, PEXPostConcatenate or PEXReplace).

transform
The new local transformation matrix.

hints
Hints for the new local transformation matrix. (PEXMHNone, PEXMHIdentity, PEXMHTranslation, PEXMHRotation, PEXMHReflection, PEXMHUniformScale, PEXMHNonUniformScale, PEXMHShear, PEXMHPerspProjective, PEXMHNonPerspProjective, PEXMH3DTo2DParProjection, PEXMH3DTo2DPerspProjection, PEXMHZero, PEXMHSingularUnknown, PEXMHNonSingularUnknown). Available only in the OCC form of the function.

Returns

None.

Description

Invoke PEXOCCSetLocalTransform to create an attribute output command which modifies the local transformation matrix in the renderer's pipeline state.

The PEXOCCSetLocalTransform function generates a PEXOCLocalTransformWithHints output command. However, if the PEX server on the display connection is version 5.1 or the Alternate Protocol Level is 5.1, then this function generates a PEXOCLocalTransform output command, ignoring any supplied hint.

The PEXSetLocalTransform function generates a PEXOCLocalTransform output command.

PEXlib defines the following composition types (composition): (5.0)

PEXPreConcatenate -
pre-concatenates the matrix you specified to the current local transformation matrix: (L' = L W T).

PEXPostConcatenate -
post-concatenates the matrix you specified to the current local transformation matrix: (L' = T W L).

PEXReplace -
replaces the current local transformation matrix with the matrix you specified: (L' = T).

See PEXSetGlobalTransform for the definition of the matrix (hints): (5.2)

You may supply more than one matrix hint by or'ing them together.

If you provide undefined hints or hints which do not accurately describe the matrix, then the result is implementation-dependent.

If you use the PEXSetLocalTransform function, then the implementation assumes the hint is PEXMHNone. The non-OCC version of the interface does not support the hints argument, for backwards compatibility with previous versions of PEXlib.

The implementation is not required to use the hints and may therefore set the pipeline state's local transform hints to PEXMHNone.

The implementation then recomputes the composite matrix using the current global transformation and the new local transformation matrix (C = G W L').

If the composition type is not valid, then the implementation issues a BadPEXOutputCommand error.

The local transform is a member of the global attribute set.

Errors

BadPEXOutputCommand
The output command contains an invalid value.

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.