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
|
.\"##
.\" $XConsortium: p337,v 5.2 94/04/17 20:58:21 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.
.ds f \s-2SET LIGHT SOURCE STATE\s+2
.TH "SET LIGHT SOURCE STATE" 3P+ "29 February 1991"
.SH NAME
SET LIGHT SOURCE STATE \- create structure element to enable and
disable light sources
.IX "Lighting" "SET LIGHT SOURCE STATE"
.\".IX "PHIGS Extension Functions" "SET LIGHT SOURCE STATE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_light_src_state ( activation, deactivation )
Pint_list *activation; \fIactivation list\fP
Pint_list *deactivation; \fIdeactivation list\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET LIGHT SOURCE STATE\s+2 creates an element in the
currently open structure enabling and disabling specified light
source representations on the table of defined light sources
stored on the workstation state list. The current light source
state determines the number and type of light sources used to
shade the primitives that follow in the structure network.
.SS C Input Parameters
.IP \fIactivation\fR
This is a list of light sources to be activated. This structure
specifies both an integer value indicating the number of light source
representations to be activated and a pointer to a list specifying
the index numbers of the light source representations to be activated.
Pint_list is defined as:
.nf
.ta .5i +\w'Pint 'u +\w'num_ints; 'u
.sp .4
typedef struct {
.sp .2
Pint num_ints; /* number of light sources to activate */
Pint *ints; /* list of light sources to activate */
.sp .2
} Pint_list;
.fi
.sp
.IP \fIdeactivation\fR
This is a list of light sources to be deactivated. This structure
specifies both an integer value indicating the number of light source
representations to be deactivated and a pointer to a list specifying
the index numbers of the light source representations to be deactivated.
Pint_list is defined as:
.nf
.ta .5i +\w'Pint 'u +\w'num_ints; 'u
.sp .4
typedef struct {
.sp .2
Pint num_ints; /* number of light sources to activate */
Pint *ints; /* list of light sources to activate */
.sp .2
} Pint_list;
.IP
.fi
.SS Execution
Depending on the edit mode, a \s-2SET LIGHT SOURCE STATE\s+2
element is inserted into the open structure after the element
pointer or replaces the element pointed at by the element pointer.
The element pointer is then updated to point to this
\s-2SET LIGHT SOURCE STATE\s+2 element.
.LP
When the \s-2SET LIGHT SOURCE STATE\s+2 element is traversed, the
light source representations listed in the activation list are added to the
current light source state entry in the
traversal state list, and the representations listed in the deactivation
list are deleted. The light source representations are
defined with the \s-2SET LIGHT SOURCE REPRESENTATION\s+2 subroutine.
.LP
The current light source state list defines the ambient, diffuse,
and specular light sources that may be used when applying lighting
and shading to area-defining or polyline primitives. The types of
light sources used are defined by the
\s-2SET INTERIOR SHADING METHOD\s+2 and \s-2SET POLYLINE SHADING METHOD\s+2
subroutines.
.RE
.SH ERRORS
.IP 005
Ignoring function, function requires state (\s-2PHOP,*,STOP,*\s+2)
.IP 133
Ignoring function, one of the entries in the activation list or
deactivation list is less than one (1)
.IP 135
Ignoring function, the same entry exists in both the activation
list and the deactivation list
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET LIGHT SOURCE REPRESENTATION (3P+)"
.SM "INQUIRE LIGHT SOURCE FACILITIES (3P+)"
.fi
|