GDIndex.gif Previous-2.gif Next-3.gif

GDxform_xxxx - GD API


Synopsis

routines to access the Graphics Display Kit transform

GDxform_get_xxxx

void   GDxform_get_matrix ( xform_id ,  float  * matrix  );
void   GDxform_get_comp_matrix ( xform_id ,  float  * composite_matrix  );
void   GDxform_get_xlate ( xform_id ,  float  * xlate  );
void   GDxform_get_center ( xform_id ,  float  * cent  );

OMobj_id   xform_id ;

 

GDxform_set_xxxx

void   GDxform_set_matrix ( xform_id ,  float  * matrix  );
void   GDxform_set_xlate ( xform_id ,  float  * xlate  );
void   GDxform_set_center ( xform_id ,  float  * cent  );

OMobj_id   xform_id ;

 

GDxform_concat_xxxx

void   GDxform_concat_matrix ( xform_id ,  float  * matrix  );
void   GDxform_concat_xlate ( xform_id ,  float  * xlate  );
void   GDxform_concat_center ( xform_id ,  float  * cent  );

OMobj_id   xform_id ;

 

GDxform_reset

void   GDxform_reset ( OMobj_id   xform_id );

Description

These routines are used to access the Graphics Display Kit transform.

The GDxform_get_xxxx routines get the subobject values of the transform. The GDxform_get_comp_matrix builds a composite matrix using the matrix, xlate, and center subobjects that represents the transformtion used at rendering time. The GDxform_set_xxxx routines set the subobject values of the xform. The GDxform_concat_xxx routines concatenate their values onto the existing values of the subobjects. These routines are used by the Graphics Display Kit texture editor (i.e., GDtexture_edit).

GDxform_reset resets the transform's subobjects to their default values. The default values are those in specified in DefaultXform.

To create an instance of a transform, call the utility routine GDcreate_instance.

Parameters

xform_id

The id of a transform.

Other get/set parameters

The other parameters in the get/set routines correspond to subobjects of the transform.

For details, see DefaultProps .

The matrix and composite_matrix parameters are four-by-four arrays.

The xlate and cent parameters are three-element arrays.

Example


/* Get and set a transformation object's center subobject. */
OMobj_id xform_id; /* Assume this has been set. */
int center[4];
...
GDxform_get_center(xform_id, center);
center[0] -= 3;
GDxform_set_center(xform_id, center);

 



GDIndex.gif Previous-2.gif Next-3.gif