.\"## .\" $XConsortium: p385,v 5.2 94/04/17 20:58:57 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 VIEW INDEX" 3P "29 February 1991" .SH NAME SET VIEW INDEX \- create a structure element containing a view index attribute .IX "Modelling and Transformation Attributes" "SET VIEW INDEX" .IX "Viewing" "SET VIEW INDEX" .IX "Attributes, Modelling and Transformation Attributes" "SET VIEW INDEX" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void pset_view_ind ( index ) Pint index; \fIview index\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, *, STOP, *) .SH DESCRIPTION .SS Purpose \s-2SET VIEW INDEX\s+2 creates a structure element containing a view index number, which selects an entry from the workstation's view table. The view representation selected maps primitives from World Coordinates to Normalized Projection Coordinates. This attribute applies to all output primitives. .LP If the current edit mode is \s-2INSERT\s+2, a \s-2SET VIEW INDEX\s+2 element is inserted into the currently open structure after the element pointed to by the current element pointer. If the edit mode is \s-2REPLACE\s+2, the new \s-2SET VIEW INDEX\s+2 element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new element. .SS C Input Parameter .IP \fIindex\fP A \fIview index\fP for a view representation on the workstation. .SS Execution When the \s-2SET VIEW INDEX\s+2 element is traversed, the `current view index' value is set to the \fIview index\fP, which specifies an entry from the workstation's view table. The default \fIview index\fP is 0, and if the \fIview index\fP specified is not available on the workstation, view index 0 will be used. .LP The view representation maps output primitives from World Coordinates to Normalized Projection Coordinates by: .RS .IP \(bu 3n Applying a view orientation matrix to transform the primitives to the Viewing Reference Coordinate system \s-2(VRC)\s+2, .IP \(bu 3n Applying a view mapping matrix to transform the primitives to the Normalized Projection Coordinate system \s-2(NPC)\s+2, and .IP \(bu 3n Optionally clipping the primitives to specified clipping limits in \s-2NPC\s+2 according to separate clipping indicators for the \fIx, y\fP, and \fIz\fP dimensions. .RE .LP A view representation is set using \s-2SET VIEW REPRESENTATION\s+2 or \s-2SET VIEW REPRESENTATION 3\s+2. See the descriptions of these functions for more information on the representations and their default values. .LP .SH ERRORS .IP 005 Ignoring function, function requires state \s-2(PHOP, *, STOP, *)\s+2 .IP 114 Ignoring function, the view index value is less than zero .SH SEE ALSO .nf .IP .ta 0.5i .SM "SET VIEW REPRESENTATION (3P)" .SM "SET VIEW REPRESENTATION 3 (3P)" .fi