.\"##
.\" $XConsortium: p330,v 5.2 94/04/17 20:58:15 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 "SET INTERIOR REPRESENTATION" 3P "29 February 1991"
.SH NAME
SET INTERIOR REPRESENTATION \- define an interior attribute bundle
on the workstation
.IX "Attribute Representations" "SET INTERIOR REPRESENTATION"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_int_rep ( ws, index, rep )
Pint	ws;		\fIworkstation identifier\fP
Pint	index;	\fIinterior bundle index\fP
Pint_bundle	*rep;	\fIinterior representation pointer\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET INTERIOR REPRESENTATION\s+2
defines a bundle of interior attributes
for a specified entry in the workstation's interior bundle table.
.\"Each entry in this table contains values for the following attributes:
.\".sp .2
.\".nf
.\".RS
.\"\(bu  interior style
.\"\(bu  interior style index
.\"\(bu  interior colour index
.\".\"PHIGS+:	\(bu  interior lighting meth
.\".\"PHIGS+:	\(bu  interior shading meth
.\".fi
.\".RE
.LP
Depending on the Aspect Source Flag
(\s-2ASF\s+2) for each of the interior attributes, the bundled
attributes may apply to the following primitives:
.RS
.LP
\(bu
.SM "FILL AREA"
.LP
\(bu 
.SM "FILL AREA 3"
.LP
\(bu
.SM "FILL AREA SET"
.LP
\(bu
.SM "FILL AREA SET 3"
.LP 
\(bu
.SM "NON-UNIFORM B-SPLINE SURFACE"
.LP 
\(bu
.SM "FILL AREA SET 3 WITH DATA"
.LP 
\(bu
.SM "QUADRILATERAL MESH 3 WITH DATA"
.LP 
\(bu
.SM "TRIANGLE STRIP 3 WITH DATA"
.LP 
\(bu
.SM "SET OF FILL AREA SET 3 WITH DATA"
.RE
.\"Depending on the ASF for each of the interior attributes,
.\"the bundled attributes may apply to the following primitives:
.\"PHIGS+:	FILL AREA SET WITH DATA
.\"PHIGS+:	FILL AREA SET 3 WITH DATA
.\"PHIGS+:	\fBNote:\fP A separate function, \s-2SET INTERIOR REPRESENTATION 
.\"PHIGS+:	PLUS\s+2, sets these same attributes in the interior bundle and
.\"PHIGS+:	also sets values for interior lighting method and interior shading method
.\"PHIGS+:	Use \s-2SET INTERIOR REPRESENTATION PLUS\s+2 when you are applying
.\"PHIGS+:	lighting and shading to your display
.SS C Input Parameters
.IP \fIws\fP
The identifier of the workstation for which the interior
representation is being defined.
.IP \fIindex\fP
The interior index of the entry being defined.
.IP \fIrep\fP
A pointer to a Pint_bundle structure containing the 
interior representation attributes.  Pint_bundle is defined as:
.nf
.ta .5i +\w'Pint_style     'u +\w'style_ind;     'u
.sp .4
typedef struct {
.sp .2
	Pint_style	style;	/* interior style */
	Pint	style_ind;	/* interior style index */
	Pint	colr_ind;	/* interior colour index */
.sp .2
} Pint_bundle;
.fi
.sp .2
.IP
\fIstyle\fR is an enumerated value specifying one of the following
interior styles.  Pint_style is defined as:
.ta .5i +\w'PSTYLE_HOLLOW,     'u
.nf
.sp .4
typedef enum {
.sp .2
	PSTYLE_HOLLOW,	\fIHollow\fP
	PSTYLE_SOLID,	\fISolid\fP
	PSTYLE_PAT,	\fIPatterned\fP
	PSTYLE_HATCH,	\fIHatched\fP
	PSTYLE_EMPTY,	\fIEmpty\fP
.sp .2
} Pint_style;
.fi
.IP
\fIstyle_ind\fR is the interior style index,
which selects from the workstation's \s-2PATTERN\s+2
or \s-2HATCH\s+2 table.
.IP
\fIcolr_ind\fR is the interior colour index,
which selects a colour value from the workstation's colour table.
.SS Execution
When \s-2SET INTERIOR REPRESENTATION\s+2 is called,
the interior index in the table of defined interior representations
on the workstation is set to the interior style, interior style index,
and interior colour index values.
.LP
When area-defining output primitives are displayed, the interior
representation specified by the current interior index entry in the
traversal state list provides the interior attributes
for which the \s-2ASF\s+2 is \s-2BUNDLED\s+2.
For example, when the current interior style \s-2ASF\s+2
is set to \s-2BUNDLED\s+2,
the \fIeffective\fP interior style is
the interior style attribute in the interior representation selected by
the current interior index.  The current interior index
is set by \s-2SET INTERIOR INDEX\s+2 elements.
.\"PHIGS+: .LP
.\"PHIGS+: The source for interior colour is determined by a combination of
.\"PHIGS+: the interior Colour Source Flag (CSF) and the interior colour
.\"PHIGS+: index ASF.  While the interior CSF is set to \s-2DIRECT\s+2,
.\"PHIGS+: interior colour is determined by a direct colour specification set
.\"PHIGS+: with the \s-2SET INTERIOR COLOUR\s+2 function, and the interior
.\"PHIGS+: colour index ASF has no effect. When the interior colour CSF
.\"PHIGS+: is set to \s-2INDEXED\s+2, the interior colour index ASF
.\"PHIGS+: determines whether the attribute is defined by a bundled or
.\"PHIGS+: individual specification in the same way as the other attributes.
.LP
The interior bundle table is numbered from 1.
.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 059
Ignoring function, the specified workstation does not have output capability
(in other words, the workstation category is neither 
\s-2OUTPUT\s+2, \s-2OUTIN\s+2, nor \s-2MO\s+2)
.IP 100
Ignoring function, the bundle index value is less than one
.IP 103
Ignoring function, setting this bundle table entry would exceed
the maximum number of entries allowed in the workstation bundle table
.IP 108
Ignoring function, the specified interior style is not available
on the workstation
.IP 112
Ignoring function, the pattern index value is less than one
.IP 113
Ignoring function, the colour index value is less than zero
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET INTERIOR INDEX (3P)"
.SM "SET INTERIOR STYLE (3P)"
.SM "SET INDIVIDUAL ASF (3P)"
.SM "INQUIRE INTERIOR REPRESENTATION (3P)"
.SM "SET INTERIOR REPRESENTATION PLUS (3P+)"
.fi
