.\"## .\" $XConsortium: p396,v 5.2 94/04/17 20:59:04 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 "TRANSFORM POINT 3" 3P "29 February 1991" .SH NAME TRANSFORM POINT 3 \- apply a \s-2\&3D\s+2 transformation matrix to a specified \s-2\&3D\s+2 point .IX "Transformation Matrix" "TRANSFORM POINT 3" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.5i 3i .nf void ptran_point3 ( p, m, error_ind, r) Ppoint3 *p; \fIpoint\fP Pmatrix3 m; \fItransformation matrix\fP Pint *error_ind; \fIOUT error indicator\fP Ppoint3 *r; \fIOUT transformed point\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, *, *, *) .SH DESCRIPTION .SS Purpose Use \s-2TRANSFORM POINT 3\s+2 to calculate the transformed coordinates of a \s-2\&3D\s+2 point. .SS C Input Parameters .IP \fIp\fP .sE A pointer to a Ppoint3 data structure containing the coordinates of the point to be transformed. Ppoint3 is defined in phigs.h as follows: .sp .4 .ta .5i +\w'Pfloat 'u +\w'x; 'u .nf typedef struct { .sp .2 Pfloat x; /* x coordinate */ Pfloat y; /* y coordinate */ Pfloat z; /* z coordinate */ .sp .2 } Ppoint3; .fi .IP \fIm\fP The 4\ \(mu\ 4 homogeneous transformation matrix to apply to \fIp\fP. .sE Pmatrix3 is defined in phigs.h as follows: .sp typedef Pfloat Pmatrix3[4][4]; .sp .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 \fIr\fP A pointer to a Ppoint3 structure in which to store the coordinates of the transformed point. .SS Execution \s-2TRANSFORM POINT\s+2 applies the 4\ \(mu\ 4 homogeneous \fItransformation matrix\fP to the \s-2\&3D\s+2 \fIpoint\fP, and returns the coordinates of the resulting point: .sp \fItransformed point\fP = \fImatrix\fP \s-2X\s+2 \fIpoint\fP .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 "ROTATE X (3P)" .SM "ROTATE Y (3P)" .SM "ROTATE Z (3P)" .SM "SCALE 3 (3P)" .SM "TRANSLATE 3 (3P)" .SM "BUILD TRANSFORMATION MATRIX 3 (3P)" .SM "COMPOSE TRANSFORMATION MATRIX 3 (3P)" .SM "COMPOSE MATRIX 3 (3P)" .SM "TRANSFORM POINT (3P)" .fi