.\"##
.\" $XConsortium: p397,v 5.2 94/04/17 20:59:05 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 "TRANSLATE" 3P "29 February 1991"
.SH NAME
TRANSLATE \- calculate a \s-2\&2D\s+2 transformation matrix to perform a specified
translation
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.5i 3i
.nf
void
ptranslate ( trans_vector, error_ind, m)
Pvec	*trans_vector;	\fItranslation vector\fP
Pint	*error_ind;	\fIOUT error indicator\fP
Pmatrix	m;	\fIOUT transformation matrix\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
Use \s-2TRANSLATE\s+2 to generate a \s-2\&2D\s+2 homogeneous
(3\ \(mu\ 3) transformation
matrix that performs a \s-2\&2D\s+2 translation.
.LP
The returned matrix can be passed as an argument to
\s-2SET LOCAL TRANSFORMATION\s+2 or \s-2SET GLOBAL TRANSFORMATION\s+2
to modify the modelling transformation that is
applied to output primitives during traversal.
.SS C Input Parameter
.IP \fItrans_vector\fP
A pointer to a Pvec structure containing the Modelling Coordinate
translation values to be applied in the \fIx\fP and \fIy\fP dimensions.
Pvec is defined in phigs.h as follows:
.sp .4
.ta .5i +.75i +.75i
.nf
typedef struct  {
.sp .2
	Pfloat	delta_x;	/* the x axis translation value */
	Pfloat	delta_y;	/* the y axis translation value */
.sp .2
} Pvec;
.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 3\ \(mu\ 3 homogeneous transformation matrix that performs the specified
translation.
Pmatrix is defined in phigs.h as follows:
.sp .4v
   typedef  Pfloat  Pmatrix[3][3];
.SS Execution
\s-2TRANSLATE\s+2 returns a \s-2\&2D\s+2 homogeneous (3\ \(mu\ 3) transformation matrix
that performs the translation specified by translation vector.
.LP
The translation vector specifies the translation distance in the
\fIx\fP and \fIy\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 (3P)"
.SM "SET GLOBAL TRANSFORMATION (3P)"
.SM "SET VIEW REPRESENTATION (3P)"
.SM "BUILD TRANSFORMATION MATRIX (3P)"
.SM "COMPOSE TRANSFORMATION MATRIX (3P)"
.SM "COMPOSE MATRIX (3P)"
.SM "TRANSFORM POINT (3P)"
.SM "TRANSLATE 3 (3P)"
.fi
