Return to index

NAME

xf_xfmpoint, xf_xfmvect, xf_rotvect, xf_scale - apply current transformation

SYNOPSIS

void xf_xfmpoint( FVECT pnew, FVECT pold )

void xf_xfmvect( FVECT vnew, FVECT vold )

void xf_rotvect( FVECT nnew, FVECT nold )

double xf_scale( double sold )

DESCRIPTION

The xf_xfmpoint routine applies the current transformation defined by xf_context to the point pold, scaling, rotating and moving it to its proper location, which is put in pnew. (As for xf_xfmvect and xf_rotvect, the two arguments may point to the same vector.)

The xf_xfmvect routine applies the current transformation to the vector vold, scaling and rotating it to its proper location, which is put in vnew. The only difference between xf_xfmpoint and xf_xfmvect is that in the latter, the final translation is not applied.

The xf_rotvect routine rotates the vector nold using the current transformation, and stores the result in nnew. No translation or scaling is applied, which is the appropriate action for surface normal vectors for example.

The xf_scale function takes a scalar argument sold and applies the current scale factor, returning the result.

SEE ALSO

xf_handler