.\"
.\" $XConsortium: p120,v 5.2 94/04/17 20:55:48 rws Exp $
.\"
.\" 
$XMCOPY
.\" Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
.\" 
.\"                         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 names of Sun Microsystems,
.\" and the X Consortium 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-2QINQUIRE DEPTH CUE REPRESENTATION\s+2
.TH "INQUIRE DEPTH CUE REPRESENTATION" 3P+ "29 February 1991"
.SH NAME
INQUIRE DEPTH CUE REPRESENTATION \- inquire depth cue representation
for a given workstation  
.IX "Attribute Representations" "INQUIRE DEPTH CUE REPRESENTATION"
.IX "Inquiry functions" "INQUIRE DEPTH CUE REPRESENTATION"
.IX "Depth Cueing" "INQUIRE DEPTH CUE REPRESENTATION"
.IX "PHIGS Extension Functions" "INQUIRE DEPTH CUE REPRESENTATION"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pinq_dcue_rep ( ws, index, type, error_ind, rep )
Pint	ws;	\fIworkstation identifier\fP
Pint	index;	\fIpolyline index\fP
Pinq_type	type;	\fItype of returned value\fP
Pint	*error_ind;	\fIOUT error indicator\fP
Pdcue_bundle	*rep;	\fIOUT depth cue representation\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP,WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2INQUIRE DEPTH CUE REPRESENTATION\s+2
returns the attribute values of a specified entry in the
workstation table of depth cue representations. See 
\s-2SET DEPTH CUE REPRESENTATION\s+2 
for a full description of the contents of the bundle table entry 
and a description of the depth cue representation table.
.SS C Input Parameters
.IP \fIws\fP
The workstation identifier.
.IP \fIindex\fP
The depth cue index.
.IP  \fItype\fP
An enumerated value specifying whether the values to be returned are 
those originally specified by the application (\s-2PINQ_SET\s+2), or
those resulting after \s-2PHIGS\s+2 mapped them to ones available on the
workstation (\s-2PINQ_REALIZED\s+2).  A Pinq_type structure is defined as:
.nf
.ta .5i +\w'PINQ_REALIZED     'u
.sp .4
typedef enum {
.sp .2
	PINQ_SET,
	PINQ_REALIZED
.sp .2
} Pinq_type;
.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 \fIrep\fP
A pointer to a Pdcue_bundle data structure containing attribute
values defining a depth cue representation.  A Pdcue_bundle structure
is defined as:
.nf
.ta .5i +\w'Pdcue_mode     'u +\w'ref_planes[2];     'u
.sp .4
typedef struct {
.sp .2
	Pdcue_mode	mode;	/* depth cue mode */
	Pfloat	ref_planes[2];	/* depth cue reference planes */
	Pfloat	scaling[2];	/* depth cue scaling */
	Pgcolr	colr;	/* depth cue colour */
.sp .2
} Pdcue_bundle;
.IP
.fi
Pdcue_mode is defined as:
.ta .5i
.nf
.sp .4
typedef enum {
.sp .2
	PSUPPRESSED,
	PALLOWED
.sp .2
} Pdcue_mode;
.IP
.fi
.\"Entry 0 in ref_planes is the back reference plane. Entry 0 in scaling
.\"is the back scaling.
.\"Entries of 0 in the reference and scaling planes are back
\fIref_planes\fR and \fIscaling\fR entries of 0 are back reference plane and
corresponding scaling factors.  \fIref_planes\fR and \fIscaling\fR entries of 1
are front reference plane and corresponding scaling factors.
These scaling factors define the portion of the primitive colour that should
be combined with the depth cue colour, as a function of \fIz\fP in \s-2NPC\s+2.
.IP
.fi
Pgcolr is defined as:
.ta .5i +1.5i   +1i  +2i
.nf
.sp .4
typedef struct {
.sp .2
	Pint	type;	/* indirect, RGB, CIE, HSV, HLS */
	union {
	     Pint	ind;	/* index in workstation colour bundle table */
	     struct {
	          Pfloat	x;	/* red, hue, etc. */
	          Pfloat	y;	/* green, saturation, lightness, etc. */
	          Pfloat	z;	/* blue, value, saturation, etc. */
	     } general;
	} val;
} Pgcolr;
.IP
.fi
.SS Execution
If the inquired information is available, the error indicator is
returned as zero and values are returned in the output parameters.
.LP
If the specified depth cue index is not present in the depth cue
table on the workstation and the specified type of returned value
is \fIRealized\fP, the representation for the depth cue index
zero is returned.
.LP
If the inquired information is not available, the values returned
in the output parameters are undefined and the error
indicator is set to one of the following error numbers to indicate
the reason for nonavailability.
.LP
Since this is an inquiry function, \s-2ERROR HANDLING\s+2 is not 
invoked when an error is detected by this function.
.RE
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP,WSOP,*,*\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 059
Ignoring function, the specified workstation does not have output
capability (that is, the workstation category is neither \s-2OUTPUT\s+2,
\s-2OUTIN\s+2, nor \s-2MO\s+2)
.IP 101
Ignoring function, the specified representation has not been defined
.IP 603
Ignoring function, the depth cue index is less than zero
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET DEPTH CUE REPRESENTATION (3P+)"
.SM "SET DEPTH CUE INDEX (3P+)"
.SM "INQUIRE LIST OF DEPTH CUE INDICES (3P+)"
.SM "INQUIRE PREDEFINED DEPTH CUE REPRESENTATION (3P+)"
.fi
