summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p272
blob: 8c814083ebf19b381f7da2b96a7492fc9192f5f9 (plain)
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
129
130
131
132
.\"##
.\" $XConsortium: p272,v 5.2 94/04/17 20:57:35 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 "SAMPLE LOCATOR" 3P "29 February 1991"
.SH NAME
SAMPLE LOCATOR \- sample the current measure of a locator device
.IX "Locator Input Devices" "SAMPLE LOCATOR"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
psample_loc ( ws, dev, view_ind, loc_pos )
Pint	ws;	\fIworkstation identifier\fP
Pint	dev;	\fIlocator device number\fP
Pint	*view_ind;	\fIOUT view index\fP	
Ppoint	*loc_pos;	\fIOUT locator data\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
Use \s-2SAMPLE LOCATOR\s+2 to sample the current measure of the specified
locator device without waiting for operator input. The device
must be in \s-2SAMPLE\s+2 mode.
See \s-2SET LOCATOR MODE\s+2 and \s-2INITIALIZE LOCATOR\s+2 for more
information.
.SS C Input Parameters
.IP \fIws\fP
Workstation identifier. An integer specifying the workstation with which
the specified locator device is associated.
.IP \fIdev\fP
The device number of the locator device to be sampled.
See the \fIAvailable Devices\fP section of \s-2INITIALIZE LOCATOR\s+2
for a description of the available devices.
.SS C Output Parameters
.IP \fIview_ind\fP
The index of the view representation used to transform
the Normalized Projection Coordinate (\s-2NPC\s+2)
position to a World Coordinates (\s-2WC\s+2) position.
.IP \fIloc_pos\fP
Ppoint 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 */
.sp .2
} Ppoint;
.fi
.SS Execution
\s-2SAMPLE LOCATOR\s+2 samples the specified locator device. The
device must be in \s-2SAMPLE\s+2 mode.
See \s-2SET LOCATOR MODE\s+2 and \s-2INITIALIZE LOCATOR\s+2 for more
information.
.LP
When a device is set to \s-2SAMPLE\s+2 mode, a measure process is created
for the device and the device is activated. When \s-2SAMPLE LOCATOR\s+2 is
called, the current value of the measure process for the specified device
is retrieved without waiting for further input from the operator.
.LP
A \s-2LOCATOR\s+2 device measure consists of a \fIposition\fP and a
\fIview index\fP.  
The \fIposition\fP is the \s-2WC\s+2 point corresponding to the
position on the workstation selected by the operator.  
The \fIview index\fP is the index of the view used to transform
\fIposition\fP from Device Coordinates (\s-2DC\s+2) to \s-2WC\s+2.  
See \s-2INITIALIZE LOCATOR\s+2 and
\s-2SET VIEW TRANSFORMATION INPUT PRIORITY\s+2 for a
description of how this view representation is determined.  
The workstation transform is used to transform the 
\s-2DC\s+2 position to a \s-2NPC\s+2 position.  
.LP
\fBNote:\fP The \s-2\&2D\s+2 and \s-2\&3D\s+2 locator measure
processes are the same except
that the \s-2\&2D\s+2 process discards the \fIz\fP coordinate.  
The \s-2\&3D\s+2 version of this
function, \s-2SAMPLE LOCATOR 3\s+2, can be used if the value of the \fIz\fP
coordinate is needed.  
.SH ERRORS
.IP 003
Ignoring function, function requires state 
(\s-2PHOP\s+2, \s-2WSOP\s+2, \s-2*\s+2, \s-2*\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 061
Ignoring function, specified workstation is neither of category \s-2INPUT\s+2
nor of category \s-2OUTIN\s+2
.IP 250
Ignoring function, the specified device is not available
on the specified workstation
.IP 252
Ignoring function, the function requires the input
device to be in \s-2SAMPLE\s+2 mode
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INITIALIZE LOCATOR (3P)"
.SM "SET LOCATOR MODE (3P)"
.SM "REQUEST LOCATOR 3 (3P)"
.SM "GET LOCATOR (3P)"
.SM "INQUIRE LOCATOR DEVICE STATE (3P)"
.SM "SET VIEW TRANSFORMATION INPUT PRIORITY (3P)"
.SM "SAMPLE LOCATOR 3 (3P)"
.fi