1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
.\"##
.\" $XConsortium: p053,v 5.1 91/02/16 09:37:38 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 "EVALUATE VIEW ORIENTATION MATRIX" 3P "29 February 1991"
.SH NAME
EVALUATE VIEW ORIENTATION MATRIX \- calculate a transformation matrix that
orients the View Reference Coordinate system in the World Coordinate
system
.IX "Viewing" "EVALUATE VIEW ORIENTATION MATRIX"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
peval_view_ori_matrix ( vrp, vup, error_ind, m )
Ppoint *vrp; \fIview reference point\fP
Pvec *vup; \fIview up vector\fP
Pint *error_ind; \fI\s-2OUT\s+2 error indicator\fP
Pmatrix m; \fI\s-2OUT\s+2 view orientation matrix\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
Use \s-2EVALUATE VIEW ORIENTATION MATRIX\s+2 to calculate a
\fIview orientation matrix\fP, used to transform
World Coordinates (\s-2WC\s+2) to
View Reference Coordinates (\s-2VRC\s+2).
This matrix establishes the \fIu\fP and \fIv\fP \s-2VRC\s+2 axes
in relation to \s-2WC\s+2 space.
The view orientation matrix calculated by this function can be
passed as an argument to \s-2SET VIEW REPRESENTATION\s+2.
.LP
See the descriptions of the functions \s-2SET VIEW REPRESENTATION\s+2 and
\s-2EVALUATE VIEW MAPPING MATRIX\s+2 in this function reference
for more information.
.SS C Input Parameters
.IP \fIvrp\fP
A pointer to a Ppoint structure containing \fIx\fP and \fIy\fP
\s-2WC\s+2s that specify the view reference point.
Ppoint is defined in phigs.h as follows:
.sp .4
.ta .5i +1.0i +1.25i
.nf
typedef struct {
.sp .2
Pfloat x; /* x coordinate */
Pfloat y; /* y coordinate */
.sp .2
} Ppoint;
.fi
.IP \fIvup\fP
A pointer to a Pvec structure containing \fIx\fP and \fIy\fP
\s-2WC\s+2 values that specify the view up vector.
Pvec is defined in phigs.h as follows:
.sp .4
.ta .5i +1.0i +1.25i
.nf
typedef struct {
.sp .2
Pfloat delta_x; /* x magnitude */
Pfloat delta_y; /* y magnitude */
.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 \s-2\&2D\s+2 homogeneous (3\ \(mu\ 3) view orientation matrix.
Pmatrix is defined in phigs.h as follows:
.IP
typedef Pfloat Pmatrix[3][3];
.SS Execution
If the input parameters are consistent and well defined,
\s-2EVALUATE VIEW ORIENTATION MATRIX\s+2 returns a \s-2\&2D\s+2
homogeneous (3\ \(mu\ 3)
transformation matrix in the output parameter
view orientation matrix.
This matrix transforms \s-2WC\s+2 to \s-2VRC\s+2
according to the values of the input parameters.
.LP
The \fIview reference point\fP defines the point in \s-2WC\s+2
space that is to be used as the origin of the \s-2VRC\s+2 system.
It is specified as a \s-2\&2D\s+2 point in the \fIz\fP
\(eq 0 plane of the \s-2WC\s+2
system and is usually a point on or near the object to be viewed.
.LP
The \fIview up vector\fP defines the \s-2UP\s+2 direction of the
\s-2VRC\s+2 system.
It is specified as a \s-2\&2D\s+2 vector relative to the view reference point.
This vector defines a direction in the \s-2WC\s+2 \fIz\fP \(eq 0 plane.
This direction becomes the \fIv\fP axis of the \s-2VRC\s+2 system.
The \fIn\fP axis of \s-2VRC\s+2 is parallel to the \fIz\fP axis
of the \s-2WC\s+2 system,
and the \fIu\fP axis is determined so that \fIu\fP, \fIv\fP,
and \fIn\fP axes form a right-handed
coordinate system.
.SH ERRORS
.IP 002
Ignoring function, function requires state (\s-2PHOP, *, *, *\s+2)
.IP 160
Ignoring function, the view up vector has length zero
|