.\"## .\" $XConsortium: p280,v 5.2 94/04/17 20:57:40 rws Exp $ .\"## .\"## $XMCOPY .\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. .\"## .\"## All Rights Reserved .\"## .\"## Permission to use, copy, modify, and distribute this software and its .\"## documentation for any purpose and without fee is hereby granted, .\"## provided that the above copyright notice appear in all copies and that .\"## both that copyright notice and this permission notice appear in .\"## supporting documentation, and that the name of Sun Microsystems, .\"## not be used in advertising or publicity .\"## pertaining to distribution of the software without specific, written .\"## prior permission. .\"## .\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, .\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO .\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR .\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF .\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR .\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\"## PERFORMANCE OF THIS SOFTWARE. .TH "SCALE 3" 3P "29 February 1991" .SH NAME SCALE 3 \- calculate a \s-2\&3D\s+2 transformation matrix to perform a specified scaling .IX "Transformation Matrix" "SCALE 3" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void pscale3 ( scale_vector, error_ind, m) Pvec3 *scale_vector; \fIscale factor vector\fP Pint *error_ind; \fI\s-2OUT\s+2 error indicator\fP Pmatrix3 m; \fI\s-2OUT\s+2 transformation matrix\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, *, *, *) .SH DESCRIPTION .SS Purpose Use \s-2SCALE 3\s+2 to generate a \s-2\&3D\s+2 homogeneous (4\ \(mu\ 4) transformation matrix that performs a \s-2\&3D\s+2 scaling. .LP The returned matrix can be passed as an argument to \s-2SET LOCAL TRANSFORMATION 3\s+2 or \s-2SET GLOBAL TRANSFORMATION 3\s+2 to modify the modelling transformation that is applied to output primitives during traversal. .SS C Input Parameter .IP \fIscale_vector\fP A pointer to a Pvec3 data structure containing the scale factors to be applied to the \fIx\fP, \fIy\fP, and \fIz\fP dimensions. Pvec3 is defined in phigs.h as follows: .sp .4 .ta .5i +\w'Pfloat 'u +\w'delta_x; 'u .nf typedef struct { .sp .2 Pfloat delta_x; /* x coordinate */ Pfloat delta_y; /* y coordinate */ Pfloat delta_z; /* z coordinate */ .sp .2 } Pvec3; .fi .SS C Output Parameters .IP \fIerror_ind\fP A pointer to the location to store the error number of any error detected by this function. .IP \fIm\fP The 4\ \(mu\ 4 homogeneous transformation matrix that performs the specified scaling. Pmatrix3 is defined in phigs.h as follows: .IP typedef Pfloat Pmatrix3[4][4]; .SS Execution \s-2SCALE 3\s+2 returns a \s-2\&3D\s+2 homogeneous (4\ \(mu\ 4) transformation matrix that performs the scaling specified by \fIscale factor vector\fP. The scaling is relative to the origin of the current modelling coordinate system. .LP The \fIscale factor vector\fP specifies \fIsx\fP, \fIsy\fP, and \fIsz\fP scaling factors that control scaling in the \fIx\fP, \fIy\fP, and \fIz\fP directions. .SH ERRORS .IP 002 Ignoring function, function requires state (\s-2PHOP, *, *, *\s+2) .SH SEE ALSO .nf .IP .ta 0.5i .SM "SET LOCAL TRANSFORMATION 3 (3P)" .SM "BUILD TRANSFORMATION MATRIX 3 (3P)" .SM "COMPOSE MATRIX 3 (3P)" .SM "SCALE (3P)" .SM "TRANSFORM POINT 3 (3P)" .fi