diff options
author | rws <empty> | 1994-02-10 17:56:30 +0000 |
---|---|---|
committer | rws <empty> | 1994-02-10 17:56:30 +0000 |
commit | d25690ea77d72b656b86f0e893d9d4bf99a0f71e (patch) | |
tree | e98a4573c0f262d1ccc2b2453b3b784d2749de99 /xc/doc/specs/PEX5 | |
parent | 3494b20d6134f6159cc6a3a6f08e31c652474e88 (diff) |
Initial revision
Diffstat (limited to 'xc/doc/specs/PEX5')
26 files changed, 30844 insertions, 0 deletions
diff --git a/xc/doc/specs/PEX5/Imakefile b/xc/doc/specs/PEX5/Imakefile new file mode 100644 index 000000000..ffc912212 --- /dev/null +++ b/xc/doc/specs/PEX5/Imakefile @@ -0,0 +1,11 @@ +XCOMM $XConsortium: Imakefile,v 1.2 94/02/10 17:36:54 rws Exp $ + +#define IHaveSubdirs +#define PassCDebugFlags + +SUBDIRS = PEXlib + +all:: + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) diff --git a/xc/doc/specs/PEX5/PEXlib/appendix b/xc/doc/specs/PEX5/PEXlib/appendix new file mode 100644 index 000000000..e72507cda --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/appendix @@ -0,0 +1,200 @@ +\& +.sp 1 +.ce 3 +\s+1\fBAppendix A\fP\s-1 + +\s+1\fBPEXlib Programming for both 5.0 and 5.1\fP\s-1 +.sp 2 +.nr H1 0 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Appendix A: PEXlib Programming for both 5.0 and 5.1 +.XE +.SH +Introduction +.XS + Introduction +.XE +.LP +A PEXlib program written to use only functionality specified +in PEX 5.0 will work with a PEX server that supports either +PEX 5.0 or PEX 5.1 protocol. However, if a PEXlib program +uses functionality present only in PEX 5.1, the program will +likely fail on a PEX 5.0 server. +.LP +This addendum gathers the differences between PEX 5.0 and PEX +5.1 in one place so the programmer can understand and account +for the changes. The programmer may wish to take advantage +of PEX 5.1 functions, if present, and perform some alternate +action if not. +.SH +Determining the Protocol Version +.XS + Determining the Protocol Version +.XE +.LP +The first task is for the programmer to determine the protocol +version that the server supports, so the program may behave +accordingly. This is accomplished with the +.PN PEXGetExtensionInfo +function: +.ID +.Co +int status; +PEXExtensionInfo *pexinfo; +char errstr[PEXErrorStringLength]; +. +. +. +status = PEXInitialize( display, PEXErrorStringLength, errstr ); +if (status != 0) { + fprintf( stderr, "%s\n", errstr ); + exit(0); +} +pexinfo = PEXGetExtensionInfo( display ); + +/* The server is a PEX 5.1 server if (pexinfo->major_version == 5) */ +/* and (pexinfo->minor_version == 1). */ +.ft P +.DE +.SH +Events +.XS + Events +.XE +.LP +PEX 5.1 defines a new X Event, +.PN PEXMaxHitsReached . +Some 5.1 +programs that use +.PN PEXPickAll +may wish to watch for this event to decide +if additional pick passes are necessary. This event will +not be sent by a PEX 5.0 server. +.SH +Enumerated Type Information +.XS + Enumerated Type Information +.XE +.LP +.PN PEXETHLHSRMode +- PEX 5.1 defines the new registered value +.PN PEXHLHSRZBufferID +.br +.PN PEXETPickOneMethod +- New enum type for 5.1. +.br +.PN PEXETPickAllMethod +- New enum type for 5.1. +.br +.PN PEXETEscape +- New enum type for 5.1 +.LP +Applications should not expect to find the +.PN PEXHLHSRZBufferID +standard +value when querying the HLHSR mode enum type from a 5.0 server +and should therefore not attempt to use it. +Applications should not attempt to query the other three types +from a PEX 5.0 server. +.SH +Implementation Dependent Constants +.XS + Implementation Dependent Constants +.XE +.LP +.PN PEXIDMaxHitsEventSupported +- New for PEX 5.1 +.LP +Applications should not attempt to query this value using the +.PN PEXGetImpDepConstants +function from a PEX 5.0 server. +.SH +General Functions +.XS + General Functions +.XE +.LP +The following PEXlib functions are new for PEX 5.1 and should +not be sent to a PEX 5.0 server. +.ID +.PN PEXMatchRenderingTargets +.PN PEXEscape +.PN PEXEscapeWithReply +.PN PEXSetEchoColor +.DE +.SH +Output Commands +.XS + Output Commands +.XE +.LP +The +.PN PEXNoop +output command function must not be sent to a PEX 5.0 server +or stored in a structure network that will be rendered by a +PEX 5.0 server. +.SH +Renderer Functions +.XS + Renderer Functions +.XE +.LP +The following PEXlib functions are new for PEX 5.1 and should +not be sent to a PEX 5.0 server. +.ID +.PN PEXRenderElements +.PN PEXAccumulateState +.DE +.SH +Renderer Dynamics +.XS + Renderer Dynamics +.XE +.LP +The following dynamics bits cannot be queried from a PEX 5.0 +server. +.ID +.PN PEXRDNPickNameSet +.PN PEXRDNPickNameSetContents +.PN PEXRDAEchoMode +.DE +.SH +Renderer Attributes +.XS + Renderer Attributes +.XE +.LP +The following renderer attributes should not be used with a PEX +5.0 server. +.ID +.PN PEXRAPickIncl +.PN PEXRAPickExcl +.PN PEXRAPickStartPath +.PN PEXRABackgroundColor +.PN PEXRAClearImage +.PN PEXRAClearZ +.PN PEXRAEchoMode +.DE +.SH +Renderer Picking Functions +.XS + Renderer Picking Functions +.XE +.LP +The following PEXlib functions are new for PEX 5.1 and should +not be sent to a PEX 5.0 server. +.ID +.PN PEXPickOne +.PN PEXBeginPickOne +.PN PEXEndPickOne +.PN PEXPickAll +.PN PEXBeginPickAll +.PN PEXEndPickAll +.DE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter01 b/xc/doc/specs/PEX5/PEXlib/chapter01 new file mode 100644 index 000000000..6f43f7b37 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter01 @@ -0,0 +1,1553 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 1\fP\s-1 + +\s+1\fBIntroduction to PEXlib\fP\s-1 +.sp 2 +.nr H1 1 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 1: Introduction to PEXlib +.XE +.LP +PEXlib is a programmer's interface to the PEX protocol. +PEX is an extension to the X window system for supporting three-dimensional +graphics. +.LP +The application can query the existence of the PEX server extension by calling +.PN XQueryExtension +using the name, +.PN PEX_NAME_STRING , +defined in PEXlib include files. +.LP +.sp +.IN Initialization +.IN PEXlib initialization +.IN PEXInitialize +.IN Termination +.IN PEXlib termination +To begin using PEXlib, the application must initialize PEXlib by calling +.PN PEXInitialize +before calling any PEXlib function which takes a display argument. +Functions which do not take a display argument may be called prior to calling +.PN PEXInitialize. +.PN PEXInitialize +must be called for each display connection the application will use. +Failure to call +.PN PEXInitialize +will result in undefined behavior for functions which take a display argument. +Termination of PEXlib occurs implicitly at either program end or +.PN XCloseDisplay . +.LP +There are four other functions that should be called during initialization to +determine what features and parameters are supported by each particular +PEX server implementation. +.IN PEXGetExtensionInfo +.IN PEXGetImpDepConstants +.IN PEXGetEnumTypeInfo +.IN PEXMatchRenderingTargets +These functions are +.PN PEXGetExtensionInfo , +.PN PEXGetImpDepConstants , +.PN PEXGetEnumTypeInfo , +and +.PN PEXMatchRenderingTargets . +.PN PEXGetExtensionInfo +returns information about the PEX server extension such as protocol version, +vendor string, release number and subset support. +.PN PEXGetImpDepConstants +returns information about supported implementation-dependent constants. +.PN PEXGetEnumTypeInfo +returns information about supported enumerated types. +.PN PEXMatchRenderingTargets +returns information about supported drawable types. +.LP +.sp +.IN Allocation +.IN Deallocation +.IN "Memory" "allocation" +.IN "Memory" "deallocation" +.IN "Memory" "XFree" +Some PEXlib functions allocate memory on behalf of the application. +Memory allocation often occurs in the case of inquiry functions where the +size of data to be returned is unknown. +Applications must use +.PN XFree +to deallocate memory that has been allocated for them by PEXlib, +unless a specific function is provided to free memory allocated for particular +PEXlib objects. +Where necessary, the specific function for deallocation is noted in the +description of the function which allocates the memory. +Memory allocated by PEXlib is considered to be `owned' by PEXlib; the +application must not modify pointers to memory returned by the library nor +attempt to free such memory except by the specified interfaces. +Data structure fields other than pointers to memory can be changed without +consequence. +.LP +.sp +.IN "Transport mechanisms" +.IN "XSync" +.IN "XSynchronize" +.IN "XNextEvent" +PEXlib is designed as an extension to Xlib using the same transport +and error mechanisms as Xlib. This includes all requests, replies, events +and errors. +This means synchronization (e.g. +.PN XSync +and +.PN XSynchronize ) +will have the same effect on PEXlib requests as they do on Xlib requests. +PEX events also are treated in the same way as X events (e.g. use +.PN XNextEvent ). +.LP +.IN "Errors" +.IN "Return values" +PEXlib functions usually do not check for invalid parameters. +Applications should be careful to pass correct data to PEXlib. +Incorrect values sent to the PEX server extension will cause an error event +to be returned to the client. +These errors are asynchronous, and so are difficult to trace to a particular +Xlib or PEXlib call unless using +.PN XSync +or +.PN XSynchronize . +Note these functions should +be used with prudence, since they slow client programs significantly. +.LP +By default, when an error event is returned by the server, Xlib prints a +message and the application does not continue. +The application can register its own error handler by calling +.PN XSetErrorHandler . +.LP +.sp +The floating point format used by PEXlib is the format native to the +architecture of the client machine (i.e. the machine on which the application +executes). All floating point values are expected to be in that native format, +with a few exceptions for functions which allow the application to specify the +floating point format. +Those functions which allow the application to specify a floating point format +deal primarily with application data that is already in protocol format, or data +that the application wants to be encoded into protocol format for its own use. +.LP +When the server to which PEXlib is sending data does not support the floating +point format native to PEXlib, PEXlib will choose an appropriate format which +is supported by the server and convert into that format when formatting +protocol to send to that server. +In cases where PEXlib must choose a non-native floating point format, the +application can determine the format chosen by calling +.PN PEXGetProtocolFloatFormat . +This is useful with those functions dealing with protocol formatted data to help +avoid unnecessary format conversions when sending the data to the PEX server. +.LP +.sp +One other function is defined in this opening chapter. +.PN PEXGetSizeOCs +is a utility function for determining the protocol formatted size of output +commands. If the output command(s) plus the request header is larger than the +maximum request size supported by a particular server (see +.PN XMaxRequestSize ), +a +.PN BadLength +error will be generated. +.LP +.sp +.IN "Include files" +.IN "Header files" +.IN "Files" "header" +.IN "Files" "include" +The PEXlib specification currently defines function bindings and include files +for the C language only. The specification is intended to work for both +ANSI C and Kernighan and Ritchie (K&R) C compilers. +.LP +The +.Pn < X11/PEX5/PEX.h > +and +.Pn < X11/PEX5/PEXlib.h > +include files contain constant definitions, macros, and data +structures used by PEXlib. +.Pn < X11/PEX5/PEXlib.h > +automatically includes +.Pn < X11/PEX5/PEX.h >. +Some data structures have fields named "reserved". These fields are necessary +to align the data correctly for efficient transfer to the protocol transport +buffer. Any values assigned to these fields will be ignored. +.IN "Library name" +.IN "compilation" +.LP +The library is specified in the compilation command as "-lPEX5". +.LP +The utility functions in \fIChapter 16\fP use math functions which create a +dependency on the math library. This means that all PEXlib applications need to +be linked with the math library, typically specified in the compilation command +as "-lm". +.LP +.sp +Sincere effort has been made to adhere to the following conventions: +.ID +.IP \s-2\(bu\s+2 2 +PEXlib uses mixed case for external symbols. PEXlib leaves all +lower-case for user variables and all upper-case for user macros, per +existing convention. Where acronyms are used in a symbol, all +characters of the acronym are upper-case, e.g. BF, HLHSR, LUT, OC, PC. +.IP \s-2\(bu\s+2 2 +All PEXlib functions, symbols, macros, user-visible data structures +or anything a user might dereference begin with "PEX". +A single exception to this is the error constants which are prefixed with +"BadPEX" in order to be consistent with Xlib. +.IP \s-2\(bu\s+2 2 +The beginnings (i.e. immediately following the "PEX" prefix) of all +function names and symbols are capitalized. +.IP \s-2\(bu\s+2 2 +All fields in a data structure are in lower-case. +Compound words are constructed with underscores. +This convention overrides the capitalization of acronyms, for data structure +field names only. +.IP \s-2\(bu\s+2 2 +The display argument, where needed, is always first in the argument list. +.IP \s-2\(bu\s+2 2 +All resource arguments, where needed, occur at the beginning of the +argument list but after the display argument. Where a drawable +resource is needed, it will be listed before other resource arguments. +.IP \s-2\(bu\s+2 2 +Source arguments always precede destination arguments. +.IP \s-2\(bu\s+2 2 +Where a mask is specified, the mask always precedes the pointer to the +structure. +.IP \s-2\(bu\s+2 2 +Where a count is specified, the count always precedes the pointer to the list. +.IP \s-2\(bu\s+2 2 +Min always precedes max. +.IP \s-2\(bu\s+2 2 +Coordinates are specified in x, y or x, y, z order. +.IP \s-2\(bu\s+2 2 +Color triplets are listed in r,g,b; h,s,v; h,l,s; u,v,l; order as +appropriate for the color type. +.IP \s-2\(bu\s+2 2 +PEXlib defines constants +for the user consistent with the PEX protocol. True and False are +already defined by Xlib, and are consistent with PEX protocol. +.DE +.bp +.XS +Function Descriptions +.XE +.SH +PEXFreeEnumInfo - Free Memory Allocated for Enumerated Type Information +.XS + PEXFreeEnumInfo +.XE +.IN "PEXFreeEnumInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeEnumInfo\^(\^unsigned long \fIcount\fP\^, unsigned long *\fIinfo_count\fP\^, PEXEnumTypeDesc *\fIenum_info\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of enumerated types. +.IP \fIinfo_count\fP 1i +An array of counts. This corresponds to the info_count_return parameter in +.PN PEXGetEnumTypeInfo . +.IP \fIenum_info\fP 1i +An array of enumerated type descriptors. This corresponds to the +enum_info_return parameter of +.PN PEXGetEnumTypeInfo . +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.PN PEXFreeEnumInfo +frees memory allocated by PEXlib for the return value and return parameter in +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXGetEnumTypeInfo - Get Enumerated Type Information +.XS + PEXGetEnumTypeInfo +.XE +.IN "PEXGetEnumTypeInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetEnumTypeInfo\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, unsigned long \fIcount\fP\^, int *\fIenum_types\fP\^, unsigned long \fIitem_mask\fP\^, unsigned long **\fIinfo_count_return\fP\^, PEXEnumTypeDesc **\fIenum_info_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIcount\fP 1i +The number of enumerated types. +.IP \fIenum_types\fP 1i +A list of enumerated types for which information is to be returned. (See the Description for valid values.) +.IP \fIitem_mask\fP 1i +A mask indicating the data to be returned for each enumerated type. (See the Description for valid values.) +.IP \fIinfo_count_return\fP 1i +Returns an array of counts. For each enumerated type, there is an entry +specifying the number of descriptors in the return value array. +.IP \fIenum_info_return\fP 1i +Returns an array of enumerated type descriptors containing the enumerated type +information. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful; non-zero otherwise. +.RE +.SH +Description +.RS +.LP +.PN PEXGetEnumTypeInfo +allows the application to inquire the supported values for each enumerated type. +It returns a descriptor for each supported value of each specified enumerated +type requested. +These values will be valid for all drawables having the same root window and +depth as the specified drawable. +.LP +The standard PEX enumerated types are: +.ID +.PN PEXETATextStyle +.PN PEXETColorApproxModel +.PN PEXETColorApproxType +.PN PEXETColorType +.PN PEXETCurveApproxMethod +.PN PEXETDisplayUpdateMode +.PN PEXETEscape +.PN PEXETFloatFormat +.PN PEXETGDP2D +.PN PEXETGDP +.PN PEXETGSE +.PN PEXETHatchStyle +.PN PEXETHLHSRMode +.PN PEXETInteriorStyle +.PN PEXETLightType +.PN PEXETLineType +.PN PEXETMarkerType +.PN PEXETModelClipOperator +.PN PEXETParaSurfCharacteristics +.PN PEXETPickAllMethod +.PN PEXETPickDeviceType +.PN PEXETPickOneMethod +.PN PEXETPolylineInterpMethod +.PN PEXETPromptEchoType +.PN PEXETReflectionModel +.PN PEXETRenderingColorModel +.PN PEXETSurfaceApproxMethod +.PN PEXETSurfaceEdgeType +.PN PEXETSurfaceInterpMethod +.PN PEXETTrimCurveApproxMethod +.DE +Enumerated type descriptors are made up of an index +field and a mnemonic field. The index field contains the numeric +value of the supported type, and the mnemonic field contains a +string describing the type. +.LP +The item mask specifies which of the fields is returned +in each enumerated type descriptor. Defined values for the item mask are +.PN PEXETCounts , +.PN PEXETIndex , +.PN PEXETMnemonic +and +.PN PEXETAll . +If the item mask is +.PN PEXETCounts , +no descriptor values are returned; only the counts will be returned. +If the item mask is +.PN PEXETIndex , +the supported index values are returned in addition to the counts. +If the item mask is +.PN PEXETMnemonic , +the mnemonic strings describing the supported values are returned in addition +to the counts. +If the item mask is +.PN PEXETAll , +both the supported index values and the mnemonic strings are returned in +addition to the counts. +.LP +PEXlib allocates memory for the returned array of counts +and for the return value array of enumerated type descriptors. +.PN PEXFreeEnumInfo +should be called to deallocate this memory. +.LP +The following are the standard enumerated type index, mnemonic pairs which may +be returned. +.RS +.PN PEXETATextStyle +.ID +.fi +.PN PEXATextNotConnected , +.PN PEXETMATextNotConnected +.br +.PN PEXATextConnected , +.PN PEXETMATextConnected +.br +.DE +.PN PEXETColorApproxModel +.ID +.fi +.PN PEXColorApproxRGB , +.PN PEXETMColorApproxRGB +.br +.PN PEXColorApproxCIE , +.PN PEXETMColorApproxCIE +.br +.PN PEXColorApproxHSV , +.PN PEXETMColorApproxHSV +.br +.PN PEXColorApproxHLS , +.PN PEXETMColorApproxHLS +.br +.PN PEXColorApproxYIQ , +.PN PEXETMColorApproxYIQ +.DE +.PN PEXETColorApproxType +.ID +.fi +.PN PEXColorSpace , +.PN PEXETMColorSpace +.br +.PN PEXColorRange , +.PN PEXETMColorRange +.DE +.PN PEXETColorType +.ID +.fi +.PN PEXColorTypeIndexed , +.PN PEXETMColorTypeIndexed +.br +.PN PEXColorTypeRGB , +.PN PEXETMColorTypeRGB +.br +.PN PEXColorTypeCIE , +.PN PEXETMColorTypeCIE +.br +.PN PEXColorTypeHSV , +.PN PEXETMColorTypeHSV +.br +.PN PEXColorTypeHLS , +.PN PEXETMColorTypeHLS +.br +.PN PEXColorTypeRGB8 , +.PN PEXETMColorTypeRGB8 +.br +.PN PEXColorTypeRGB16 , +.PN PEXETMColorTypeRGB16 +.DE +.PN PEXETCurveApproxMethod +.ID +.fi +.PN PEXApproxImpDep , +implementation-dependent string +.br +.PN PEXApproxConstantBetweenKnots , +.PN PEXETMApproxConstantBetweenKnots +.br +.PN PEXApproxWCChordalSize , +.PN PEXETMApproxWCChordalSize +.br +.PN PEXApproxNPCChordalSize , +.PN PEXETMApproxNPCChordalSize +.br +.PN PEXApproxDCChordalSize , +.PN PEXETMApproxDCChordalSize +.br +.PN PEXCurveApproxWCChordalDev , +.PN PEXETMCurveApproxWCChordalDev +.br +.PN PEXCurveApproxNPCChordalDev , +.PN PEXETMCurveApproxNPCChordalDev +.br +.PN PEXCurveApproxDCChordalDev , +.PN PEXETMCurveApproxDCChordalDev +.br +.PN PEXApproxWCRelative , +.PN PEXETMApproxWCRelative +.br +.PN PEXApproxNPCRelative , +.PN PEXETMApproxNPCRelative +.br +.PN PEXApproxDCRelative , +.PN PEXETMApproxDCRelative +.DE +.PN PEXETDisplayUpdateMode +.ID +.fi +.PN PEXVisualizeEach , +.PN PEXETMVisualizeEach +.br +.PN PEXVisualizeEasy , +.PN PEXETMVisualizeEasy +.br +.PN PEXVisualizeNone , +.PN PEXETMVisualizeNone +.br +.PN PEXSimulateSome , +.PN PEXETMSimulateSome +.br +.PN PEXVisualizeWhenever , +.PN PEXETMVisualizeWhenever +.DE +.PN PEXETEscape +.ID +.fi +.PN PEXEscapeSetEchoColor +.PN PEXETMEscapeSetEchoColor +.DE +.PN PEXETFloatFormat +.ID +.fi +.PN PEXIEEE_754_32 , +.PN PEXETMIEEE_754_32 +.br +.PN PEXDEC_F_Floating , +.PN PEXETMDEC_F_Floating +.br +.PN PEXIEEE_754_64 , +.PN PEXETMIEEE_754_64 +.br +.PN PEXDEC_D_Floating , +.PN PEXETMDEC_D_Floating +.DE +.PN PEXETGDP2D +.ID +.fi +There are currently no standard 2D generalized drawing primitives. +.DE +.PN PEXETGDP +.ID +.fi +There are currently no standard 3D generalized drawing primitives. +.DE +.PN PEXETGSE +.ID +.fi +There are currently no standard generalized structure elements. +.DE +.PN PEXETHatchStyle +.ID +.fi +There are currently no standard hatch styles. +.DE +.PN PEXETHLHSRMode +.ID +.fi +.PN PEXHLHSROff , +.PN PEXETMHLHSROff +.br +.PN PEXHLHSRZBuffer , +.PN PEXETMHLHSRZBuffer +.br +.PN PEXHLHSRPainters , +.PN PEXETMHLHSRPainters +.br +.PN PEXHLHSRScanline , +.PN PEXETMHLHSRScanline +.br +.PN PEXHLHSRHiddenLineOnly , +.PN PEXETMHLHSRHiddenLineOnly +.br +.PN PEXHLHSRZBufferID , +.PN PEXETMHLHSRZBufferID +.DE +.PN PEXETInteriorStyle +.ID +.fi +.PN PEXInteriorStyleHollow , +.PN PEXETMInteriorStyleHollow +.br +.PN PEXInteriorStyleSolid , +.PN PEXETMInteriorStyleSolid +.br +.PN PEXInteriorStylePattern , +.PN PEXETMInteriorStylePattern +.br +.PN PEXInteriorStyleHatch , +.PN PEXETMInteriorStyleHatch +.br +.PN PEXInteriorStyleEmpty , +.PN PEXETMInteriorStyleEmpty +.DE +.PN PEXETLightType +.ID +.fi +.PN PEXLightAmbient , +.PN PEXETMLightAmbient +.br +.PN PEXLightWCVector , +.PN PEXETMLightWCVector +.br +.PN PEXLightWCPoint , +.PN PEXETMLightWCPoint +.br +.PN PEXLightWCSpot , +.PN PEXETMLightWCSpot +.DE +.PN PEXETLineType +.ID +.fi +.PN PEXLineTypeSolid , +.PN PEXETMLineTypeSolid +.br +.PN PEXLineTypeDashed , +.PN PEXETMLineTypeDashed +.br +.PN PEXLineTypeDotted , +.PN PEXETMLineTypeDotted +.br +.PN PEXLineTypeDashDot , +.PN PEXETMLineTypeDashDot +.DE +.PN PEXETMarkerType +.ID +.fi +.PN PEXMarkerDot , +.PN PEXETMMarkerDot +.br +.PN PEXMarkerCross , +.PN PEXETMMarkerCross +.br +.PN PEXMarkerAsterisk , +.PN PEXETMMarkerAsterisk +.br +.PN PEXMarkerCircle , +.PN PEXETMMarkerCircle +.br +.PN PEXMarkerX , +.PN PEXETMMarkerX +.DE +.PN PEXETModelClipOperator +.ID +.fi +.PN PEXModelClipReplace , +.PN PEXETMModelClipReplace +.br +.PN PEXModelClipIntersection , +.PN PEXETMModelClipIntersection +.DE +.PN PEXETParaSurfCharacteristics +.ID +.fi +.PN PEXPSCNone , +.PN PEXETMPSCNone +.br +.PN PEXPSCImpDep , +implementation-dependent string +.br +.PN PEXPSCIsoCurves , +.PN PEXETMPSCIsoCurves +.br +.PN PEXPSCMCLevelCurves , +.PN PEXETMPSCMCLevelCurves +.br +.PN PEXPSCWCLevelCurves , +.PN PEXETMPSCWCLevelCurves +.DE +.PN PEXETPickAllMethod +.ID +.fi +.PN PEXPickAllAll , +.PN PEXETMPickAllAll +.br +.PN PEXPickAllVisible , +.PN PEXETMPickAllVisible +.DE +.PN PEXETPickDeviceType +.ID +.fi +.PN PEXPickDeviceDCHitBox , +.PN PEXETMPickDeviceDCHitBox +.br +.PN PEXPickDeviceNPCHitVolume , +.PN PEXETMPickDeviceNPCHitVolume +.DE +.PN PEXETPickOneMethod +.ID +.fi +.PN PEXPickLast , +.PN PEXETMPickLast +.br +.PN PEXPickClosestZ , +.PN PEXETMPickClosestZ +.br +.PN PEXPickVisibleAny , +.PN PEXETMPickVisibleAny +.br +.PN PEXPickVisibleClosest , +.PN PEXETMPickVisibleClosest +.DE +.PN PEXETPolylineInterpMethod +.ID +.fi +.PN PEXPolylineInterpNone , +.PN PEXETMPolylineInterpNone +.br +.PN PEXPolylineInterpColor , +.PN PEXETMPolylineInterpColor +.DE +.PN PEXETPromptEchoType +.ID +.fi +.PN PEXEchoPrimitive , +.PN PEXETMEchoPrimitive +.br +.PN PEXEchoStructure , +.PN PEXETMEchoStructure +.br +.PN PEXEchoNetwork , +.PN PEXETMEchoNetwork +.DE +.PN PEXETReflectionModel +.ID +.fi +.PN PEXReflectionNone , +.PN PEXETMReflectionNone +.br +.PN PEXReflectionAmbient , +.PN PEXETMReflectionAmbient +.br +.PN PEXReflectionDiffuse , +.PN PEXETMReflectionDiffuse +.br +.PN PEXReflectionSpecular , +.PN PEXETMReflectionSpecular +.DE +.PN PEXETRenderingColorModel +.ID +.fi +.PN PEXRenderingColorModelImpDep , +implementation-dependent string +.br +.PN PEXRenderingColorModelRGB , +.PN PEXETMRenderingColorModelRGB +.br +.PN PEXRenderingColorModelCIE , +.PN PEXETMRenderingColorModelCIE +.br +.PN PEXRenderingColorModelHSV , +.PN PEXETMRenderingColorModelHSV +.br +.PN PEXRenderingColorModelHLS , +.PN PEXETMRenderingColorModelHLS +.DE +.PN PEXETSurfaceApproxMethod +.ID +.fi +.PN PEXApproxImpDep , +implementation-dependent string +.br +.PN PEXApproxConstantBetweenKnots , +.PN PEXETMApproxConstantBetweenKnots +.br +.PN PEXApproxWCChordalSize , +.PN PEXETMApproxWCChordalSize +.br +.PN PEXApproxNPCChordalSize , +.PN PEXETMApproxNPCChordalSize +.br +.PN PEXApproxDCChordalSize , +.PN PEXETMApproxDCChordalSize +.br +.PN PEXSurfaceApproxWCPlanarDev , +.PN PEXETMSurfaceApproxWCPlanarDev +.br +.PN PEXSurfaceApproxNPCPlanarDev , +.PN PEXETMSurfaceApproxNPCPlanarDev +.br +.PN PEXSurfaceApproxDCPlanarDev , +.PN PEXETMSurfaceApproxDCPlanarDev +.br +.PN PEXApproxWCRelative , +.PN PEXETMApproxWCRelative +.br +.PN PEXApproxNPCRelative , +.PN PEXETMApproxNPCRelative +.br +.PN PEXApproxDCRelative , +.PN PEXETMApproxDCRelative +.DE +.PN PEXETSurfaceEdgeType +.ID +.fi +.PN PEXSurfaceEdgeSolid , +.PN PEXETMSurfaceEdgeSolid +.br +.PN PEXSurfaceEdgeDashed , +.PN PEXETMSurfaceEdgeDashed +.br +.PN PEXSurfaceEdgeDotted , +.PN PEXETMSurfaceEdgeDotted +.br +.PN PEXSurfaceEdgeDashDot , +.PN PEXETMSurfaceEdgeDashDot +.DE +.PN PEXETSurfaceInterpMethod +.ID +.fi +.PN PEXSurfaceInterpNone , +.PN PEXETMSurfaceInterpNone +.br +.PN PEXSurfaceInterpColor , +.PN PEXETMSurfaceInterpColor +.br +.PN PEXSurfaceInterpDotProduct , +.PN PEXETMSurfaceInterpDotProduct +.br +.PN PEXSurfaceInterpNormal , +.PN PEXETMSurfaceInterpNormal +.DE +.PN PEXETTrimCurveApproxMethod +.ID +.fi +.PN PEXApproxImpDep , +implementation-dependent string +.br +.PN PEXApproxConstantBetweenKnots , +.PN PEXETMApproxConstantBetweenKnots +.DE +.RE +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + PEXEnumTypeIndex index; + char *descriptor; /* null terminated string */ +} PEXEnumTypeDesc; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.IP \fIBadValue\fP 1i +A specified enumerated type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeEnumInfo +.RE +.bp +.SH +PEXGetExtensionInfo - Get Extension Information +.XS + PEXGetExtensionInfo +.XE +.IN "PEXGetExtensionInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXExtensionInfo *PEXGetExtensionInfo\^(\^Display *\fIdisplay\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.RE +.SH +Returns +.RS +.LP +A pointer to the extension information; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +.PN PEXGetExtensionInfo +allows an application program to inquire the extension +information from a PEX server extension. +.LP +The major version +number, minor version number, release number, vendor name, and subset +information are returned. If the subset value is +.PN PEXCompleteImplementation , +the extension is a full PEX implementation. +If the subset value is +.PN PEXImmediateMode , +the extension supports only the "immediate rendering" subset of PEX. +If the subset value is +.PN PEXStructureMode , +the extension supports only the "structure rendering" subset of PEX. +If the subset value is +.Pn ( PEXImmediateMode +& +.PN PEXStructureMode ), +the extension supports both the "immediate rendering" and the +"structure rendering" subsets of PEX. +If the subset value is +.PN PEXWorkstationOnly , +the extension supports only the "PHIGS workstation" subset of PEX. +.LP +The memory returned by this function is private to PEXlib and must not be +modified or freed by the application. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short major_version; + unsigned short minor_version; + unsigned long release; + unsigned long subset_info; + char *vendor_name; + int major_opcode; + int first_event; + int first_error; +} PEXExtensionInfo; +.ft P +.DE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGetImpDepConstants - Get Implementation Dependent Constants +.XS + PEXGetImpDepConstants +.XE +.IN "PEXGetImpDepConstants" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetImpDepConstants\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, unsigned long \fIcount\fP\^, unsigned short *\fInames\fP\^, PEXImpDepConstant **\fIconstants_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIcount\fP 1i +The number of implementation-dependent constants. +.IP \fInames\fP 1i +An array of names of implementation-dependent constants to be returned. (See the Description for valid values.) +.IP \fIconstants_return\fP 1i +Returns an array of implementation-dependent constants. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful; non-zero otherwise. +.RE +.SH +Description +.RS +.LP +.PN PEXGetImpDepConstants +allows an application program to query one or more +implementation-dependent constants. +.LP +A single integer or floating-point value is +returned for each value requested. These values are returned +in order, with one return value in constants for each +item in names. +The implementation-dependent constants returned are based +on the values used for a drawable having the same +root and depth as the drawable specified. +PEXlib allocates memory for the returned constants. +.PN XFree +should be called to deallocate the memory. +.LP +The following implementation-dependent constants are standard: +.RS +.LP +.PN PEXIDBestColorApprox +(integer) - +Either +.PN PEXColorApproxPowersOf2 +or +.PN PEXColorApproxAnyValues , +depending on whether there is a significant performance gain if the number +of reds/greens/blues in the color approximation table entry is +a power of two, so pixels can be composed using shifts +and adds. +.LP +.PN PEXIDDitheringSupported +(integer) - +Either +.PN True +if the dithering hint in color approximation lookup tables is +used to control dithering, +or +.PN False , +if the dithering hint in color approximation lookup tables is not used. +.LP +.PN PEXIDDoubleBufferingSupported +(integer) - +Either +.PN True +if the server supports double-buffering for workstation resources, +or +.PN False , +if the server does not supports double-buffering for workstation resources. +.LP +.PN PEXIDMaxEdgeWidth +(integer) - +Width (in pixels) of widest edge that can be drawn. +.LP +.PN PEXIDMaxHitsEventSupported +(integer) - +.PN True +if the server supports the +.PN PEXMaxHitsReached +event, +or +.PN False , +if the server does not support the event. +.LP +.PN PEXIDMaxLineWidth +(integer) - +Width (in pixels) of widest line or curve that can be drawn. +.LP +.PN PEXIDMaxMarkerSize +(integer) - +Largest dimension (either height or width, in pixels) of +largest marker that can be drawn. This maximum is exclusive +of the marker type +.PN PEXMarkerDot +which is always drawn as the smallest displayable point. +.LP +.PN PEXIDMaxModelClipPlanes +(integer) - +Maximum number of modeling clipping planes may be defined. +.LP +.PN PEXIDMaxNameSetNames +(integer) - +Maximum number of names allowed in a name set. +.LP +.PN PEXIDMaxNonAmbientLights +(integer) - +Maximum number of non-ambient light sources that can be enabled +at one time. +.LP +.PN PEXIDMaxNURBOrder +(integer) - +Maximum non-uniform rational B-spline order supported. +.LP +.PN PEXIDMaxTrimCurveOrder +(integer) - +Maximum order for trim curves. +.LP +.PN PEXIDMinEdgeWidth +(integer) - +Width (in pixels) of thinnest edge that can be drawn. +.LP +.PN PEXIDMinLineWidth +(integer) - +Width (in pixels) of thinnest line or curve that can be drawn. +.LP +.PN PEXIDMinMarkerSize +(integer) - +Largest dimension (either height or width, in pixels) of +smallest marker that can be drawn. This minimum is exclusive +of the marker type +.PN PEXMarkerDot +which is always drawn as the smallest displayable point. +.LP +.PN PEXIDNominalEdgeWidth +(integer) - +Width (in pixels) of "standard" edge. +.LP +.PN PEXIDNominalLineWidth +(integer) - +Width (in pixels) of "standard" line or curve. +.LP +.PN PEXIDNominalMarkerSize +(integer) - +Largest dimension (either height or width, in pixels) of +"standard" marker. +.LP +.PN PEXIDNumSupportedEdgeWidths +(integer) - +Number of supported edge widths. A value of 0 indicates that +all edge widths, including fractional widths, between the +minimum and maximum edge width are supported. +.LP +.PN PEXIDNumSupportedLineWidths +(integer) - +Number of supported line or curve widths. A value of 0 +indicates that all line widths, including fractional widths, +between the minimum and maximum line width are supported. +.LP +.PN PEXIDNumSupportedMarkerSizes +(integer) - +Number of supported marker sizes. A value of 0 indicates that +all marker sizes, including fractional values, between the +minimum and maximum marker size are supported. +.LP +.PN PEXIDTransparencySupported +(integer) - +Either +.PN True +if the transmission coefficient is utilized in the reflectance calculations, +or +.PN False , +if the transmission coefficient is not utilized. +.LP +.PN PEXIDChromaticityRedU +(flt_point) - +CIEYUV u chromaticity coefficient for the red channel +of the (properly adjusted) display device. +.LP +.PN PEXIDChromaticityRedV +(flt_point) - +CIEYUV v chromaticity coefficient for the red channel +of the (properly adjusted) display device. +.LP +.PN PEXIDLuminanceRed +(flt_point) - +CIEYUV luminance value for the red channel of the (properly +adjusted) display device. +.LP +.PN PEXIDChromaticityGreenU +(flt_point) - +CIEYUV u chromaticity coefficient for the green channel +of the (properly adjusted) display device. +.LP +.PN PEXIDChromaticityGreenV +(flt_point) - +CIEYUV v chromaticity coefficient for the green channel +of the (properly adjusted) display device. +.LP +.PN PEXIDLuminanceGreen +(flt_point) - +CIEYUV luminance value for the green channel of the (properly +adjusted) display device. +.LP +.PN PEXIDChromaticityBlueU +(flt_point) - +CIEYUV u chromaticity coefficient for the blue channel +of the (properly adjusted) display device. +.LP +.PN PEXIDChromaticityBlueV +(flt_point) - +CIEYUV v chromaticity coefficient for the blue channel +of the (properly adjusted) display device. +.LP +.PN PEXIDLuminanceBlue +(flt_point) - +CIEYUV luminance value for the blue channel of the (properly +adjusted) display device. +.LP +.PN PEXIDChromaticityWhiteU +(flt_point) - +CIEYUV u chromaticity coefficient for the reference white +of the (properly adjusted) display device. +.LP +.PN PEXIDChromaticityWhiteV +(flt_point) - +CIEYUV v chromaticity coefficient for the reference white +of the (properly adjusted) display device. +.LP +.PN PEXIDLuminanceWhite +(flt_point) - +CIEYUV luminance value for the reference white of the (properly +adjusted) display device. +.RE +.RE +.SH +Data Structures +.ID +.Co +typedef union { + unsigned long integer; + float flt_point; +} PEXImpDepConstant; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.IP \fIBadValue\fP 1i +A specified implementation-dependent constant name is invalid. +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXInitialize - Initialize PEXlib display connection +.XS + PEXInitialize +.XE +.IN "PEXInitialize" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXInitialize\^(\^Display *\fIdisplay\fP\^, PEXExtensionInfo **\fIinfo_return\fP\^, int \fIlength\fP\^, char *\fIerror_string\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIinfo_return\fP 1i +Returns a pointer to the extension information; if available (see the Description). +.IP \fIlength\fP 1i +The length, in bytes, of the memory allocated for the error string. +.IP \fIerror_string\fP 1i +A pointer to memory allocated for the error string. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following return values: +.ID +.PN PEXBadExtension +.PN PEXBadProtocolVersion +.PN PEXBadFloatConversion +.PN PEXBadLocalAlloc +.DE +.RE +.SH +Description +.RS +.LP +.PN PEXInitialize +initializes PEXlib for the specified display. +.LP +.PN PEXInitialize +can be called multiple times; subsequent calls will result in the same return +value as the first call. +.LP +Standard +.PN PEXInitialize +failure return values are: +.ID +.fi +.PN PEXBadExtension +- the PEX server extension does not exist, +.br +.PN PEXBadProtocolVersion +- the PEX server extension does not support a compatible protocol version, +.br +.PN PEXBadFloatConversion +- the PEX server extension does not support a protocol floating point format +compatible with PEXlib's native format or a format to which PEXlib supports +conversion, or +.br +.PN PEXBadLocalAlloc +- PEXlib client-side allocation failed. +.DE +.LP +If +.PN PEXInitialize +is successful (return value is zero), or if the return value is +.PN PEXBadProtocolVersion , +a pointer to the extension information is returned in info_return. +Otherwise, a NULL pointer is returned in info_return. The +extension information is private to PEXlib and must not be modified or freed +by the application. +.LP +The error string parameter specifies an address to +memory allocated by the application. +The constant +.PN PEXErrorStringLength +is defined as a guideline for the size to allocate for the error string. +If no failure occurred, the memory +addressed by the error string parameter will be unchanged. +If a failure does occur, an error string giving further information about +the failure will be copied into this memory (up to the maximum specified by the +length parameter). +.LP +The actual string returned is implementation dependent, and is provided +primarily for convenience in printing an error message for the application's +end-user. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short major_version; + unsigned short minor_version; + unsigned long release; + unsigned long subset_info; + char *vendor_name; + int major_opcode; + int first_event; + int first_error; +} PEXExtensionInfo; +.ft P +.DE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetExtensionInfo , +.PN PEXGetEnumTypeInfo , +.PN PEXGetImpDepConstants , +.br +.PN PEXMatchRenderingTargets +.RE +.bp +.SH +PEXMatchRenderingTargets - Return Information about Supported Rendering Targets +.XS + PEXMatchRenderingTargets +.XE +.IN "PEXMatchRenderingTargets" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXMatchRenderingTargets\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, int \fIdepth\fP\^, int \fItype\fP\^, Visual *\fIvisual\fP\^, unsigned long \fImax_targets\fP\^, unsigned long *\fIcount_return\fP\^, PEXRenderingTarget **\fItargets_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIdrawable\fP 1i +The drawable indicates which screen the application is interested in. +.IP \fIdepth\fP 1i +The depth of interest. +.IP \fItype\fP 1i +The drawable type of interest +.Pn ( PEXAnyDrawable , +.PN PEXWindowDrawable , +.PN PEXPixmapDrawable , +.PN PEXBufferDrawable ). +.IP \fIvisual\fP 1i +The visual of interest. +.IP \fImax_targets\fP 1i +The maximum number of targets to return. +.IP \fIcount_return\fP 1i +Returns the actual number of targets in the return array. +.IP \fItargets_return\fP 1i +Returns an array of rendering target information. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful; non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns information about which drawable types the server +supports. +.LP +A drawable is specified only to indicate the screen for which the +returned information should apply. None of the other drawable attributes are +used. +.LP +The depth value is specified to indicate the depth for which the returned +information should apply. If the application wants information on all +supported depths, a value of zero should be specified. +.LP +The drawable type is specified to indicate the type of drawable for which +the returned information should apply. +The type field of the +.PN PEXRenderingTarget +data structure will have these same values with the exception of +.PN PEXAnyDrawable . +.LP +The visual is specified to indicate the visual for which the returned +information should apply. If the application wants information on all +supported visuals, a null pointer should be specified. +.LP +PEXlib allocates memory for the returned target values. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + int depth; + int type; /* PEXWindowDrawable, PEXPixmapDrawable, PEXBufferDrawable */ + Visual *visual; +} PEXRenderingTarget; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified visual is invalid. +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGetProtocolFloatFormat - Return Float Format used on Specified Display Connection +.XS + PEXGetProtocolFloatFormat +.XE +.IN "PEXGetProtocolFloatFormat" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGetProtocolFloatFormat\^(\^Display *\fIdisplay\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.RE +.SH +Returns +.RS +.LP +Protocol floating point format (see +.PN PEXGetEnumTypeInfo ); +zero if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the protocol floating point format being used by PEXlib +on the specified display connection. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGetSizeOCs - Return the Protocol Formatted Size of Output Commands +.XS + PEXGetSizeOCs +.XE +.IN "PEXGetSizeOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGetSizeOCs\^(\^int \fIfloat_format\fP, int \fIoc_count\fP\^, PEXOCData *\fIoc_data\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfloat_format\fP 1i +The floating point format to use in computing the formatted size. +.IP \fIoc_count\fP 1i +The number of output commands. +.IP \fIoc_data\fP 1i +An array of output command data. +.RE +.SH +Returns +.RS +.LP +The size, in bytes, of the formatted output commands; zero if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns information about the size of the protocol for the output +commands. An unsuccessful return value is possible if the specified floating +point format is invalid or unsupported by PEXlib. +.LP +.RE +.SH +Data Structures +.ID +.Co +See PEXlib.h for the definition of PEXOCData. +.ft P +.DE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter02.1 b/xc/doc/specs/PEX5/PEXlib/chapter02.1 new file mode 100644 index 000000000..1c22940bd --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter02.1 @@ -0,0 +1,879 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 2\fP\s-1 + +\s+1\fBOutput Commands\fP\s-1 +.sp 2 +.nr H1 2 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 2: Output Commands +.XE +.LP +The functions described in this chapter direct output commands to the specified +display. +Output commands may be rendered immediately or stored in a structure resource. +The first three parameters of all output command functions are identical: +the first parameter specifies the display connection, the second parameter +specifies the resource identifier for the targeted renderer or structure, and +the third parameter specifies whether the output commands are to be rendered +immediately (in which case the second parameter identifies the renderer +resource) or stored in a structure (in which case the second parameter +identifies the structure resource). +In order for a PHIGS workstation resource to process output commands for +rendering, the output commands must be stored in structures. +See \fIChapter 10: PHIGS Workstations\fP. +.LP +.sp +Note, above, that the third parameter to each output command function (the +request type parameter) determines +how PEXlib will send the output command to the PEX server. This parameter must +have one of four values: +.PN PEXOCRender , +.PN PEXOCRenderSingle , +.PN PEXOCStore +or +.PN PEXOCStoreSingle . +.IN PEXRCRenderOutputCommands +The first two, +.PN PEXOCRender +and +.PN PEXOCRenderSingle , +will cause the output command to be formatted into a +.PN PEXRCRenderOutputCommands +request. This request will cause the server to immediately render the output +commands using the specified renderer when the request is received by the +server. +.IN PEXRCStoreElements +.PN PEXOCStore +and +.PN PEXOCStoreSingle +will cause the output command to be formatted into a +.PN PEXRCStoreElements +request. This request will cause the server to store the output +commands into the specified structure when the request is received by the +server. +.LP +In order to improve performance, PEXlib will try to pack output commands into +single +.PN PEXRCRenderOutputCommands +or +.PN PEXRCStoreElements +requests. This packing, or buffering, of output commands will normally occur +when the request type is +.PN PEXOCRender +or +.PN PEXOCStore . +When the request type is +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle , +PEXlib will force the output command to be formatted into a single request by +itself. This is useful, as an example, for debugging purposes. +.LP +Also, behavior of the +.PN PEXRCStoreElements +request when the specified structure's editing mode is +.PN PEXStructureReplace +is not deterministic when using the request type +.PN PEXOCStore . +The +.PN PEXRCStoreElements +request will replace a range of elements in the structure dependent upon how +many output commands are in the request. The number of output commands in a +given request is dependent upon too many variables to predict. Applications +should either use +.PN PEXOCStoreSingle +when the structure's editing mode is +.PN PEXStructureReplace , +or delete elements and use +.PN PEXStructureInsert +to insert the new elements. +See \fIChapter 7: Structures\fP for more detail. +.LP +Finally, PEXlib will not pack a single request so that it is too large to send +to the server. However, if a single OC is too large to send, PEXlib will cause the server to produce a +.PN BadLength +error. +The application can determine before-hand if an OC is too large by calling +.PN PEXGetSizeOCs +and +.PN XMaxRequestSize . +See \fIChapter 1: Introduction to PEXlib\fP for more detail. +.NH 2 +Primitives and Attributes +.XS +\*(SN Primitives and Attributes +.XE +.IN "output commands" +.IN "primitives" +.IN "attributes" +.LP +Output commands processed by a renderer or PHIGS workstation to produce +visible output (that is, pixels on the display screen) are called output +primitives or simply primitives. PEX supports a number of output primitives, +including markers, text and annotation text, polylines and non-uniform +B-spline curve, fill areas, fill area sets, triangle strips, +quadrilateral meshes, non-uniform B-spline surfaces, cell arrays and a +generalized drawing primitive (or GDP). +.LP +Output commands which alter the rendering +pipeline state are called output primitive attributes or simply attributes. +The initial renderer or PHIGS workstation pipeline state is provided by a +pipeline +context resource or defaults if no pipeline context resource was specified in +the creation of the renderer or PHIGS workstation resource. +After the renderer or PHIGS workstation has obtained its initial pipeline state, +pipeline attributes +are modifiable only by the output primitive attribute functions described in +this chapter. +It is not possible to directly query the current pipeline state. +.LP +More detailed information on attributes is given in +\fIChapter 4: Pipeline Contexts\fP. +.LP +.sp +Attributes that affect all output primitives are: +.ID +HLHSR identifier +color approximation index +depth cue index +global transformation +local transformation +model clip flag +model clip volume +name set +pick id +rendering color model +view index +.DE +.NH 3 +Markers +.XS +\*(SN Markers +.XE +.LP +.IN "markers" +.IN "primitives" "markers" +A marker is a two-dimensional glyph, or symbol, representing a location in +three-dimensional space. Modeling coordinates specify the marker's position. +The position is transformed within the rendering pipeline like other output +primitive coordinates. Since a marker has no surface from which to reflect +light, the light-source illumination stage of the rendering pipeline has no +effect on markers. When depth-cueing is enabled, a marker's color is affected +by the depth-cueing computation. +.LP +The attributes that affect marker primitives are: +.ID +marker bundle index +marker color +marker color asf +marker scale +marker scale asf +marker type +marker type asf +.DE +.LP +The marker color is the intrinsic color of the marker. This color +is affected by the depth-cueing computation, +if depth-cueing is enabled. +The resulting color is then transformed, by the color approximation stage of the +rendering pipeline, into a color the device can display. +There are two output commands for setting the marker color attribute. +The first allows an application to set the marker color to a particular indexed +color value. The second +is more general, allowing the marker color to be set to an +indexed color value or a direct color value. +.LP +The marker type indicates the glyph used to represent the marker's position. +Supported values for marker type are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +The marker scale is used to control the size of the rendered marker glyph. +The nominal size of a marker is the size used if the marker scale is set to +1.0. (See +.PN PEXGetImpDepConstants .) +The marker's displayed size is computed by +multiplying the marker's nominal size by the marker scale value, and then +selecting the nearest available size for the marker. +An exception to this is +.PN PEXMarkerDot +which is always displayed as the smallest dot the workstation can display. +.LP +Whenever a marker primitive is rendered, each of the marker attributes is +obtained directly from the current pipeline state or indirectly from a marker +bundle table. The source for the attribute value is determined by the current +settings of the marker aspect source flags, or ASFs. If an attribute's ASF +is set to +.PN PEXIndividual , +the attribute value is obtained directly from the +current pipeline state. If an attribute's ASF is set to +.PN PEXBundled , +the +attribute value is obtained from the current marker bundle table. The marker +bundle index attribute indicates the marker bundle table entry to be used. +Marker color asf, marker type asf, and marker scale asf are the +attributes which control the source of marker attribute values. +.LP +The treatment of markers during hidden surface computations depends on the +HLHSR (Hidden Line/Hidden Surface Renderer) mode selected and its +implementation. Z-buffer algorithms usually perform the hidden +surface computation on the realization of marker glyphs. Scan-line +algorithms may determine visibility for markers solely from the 3D position +of the marker. Clipping is performed on the marker position. If the marker +position is outside the clipping volume, no portion of the marker glyph +will be rendered. Clipping of portions of marker glyphs that extend beyond the +clipping volume is implementation-dependent. +.NH 3 +Text +.XS +\*(SN Text +.XE +.LP +Two types of text primitives are supported: regular text and annotation text. +Regular text primitives are rendered in an arbitrary 3D plane, while +annotation text appears parallel to the view surface. +.LP +A text string is a list of characters rendered at a +particular location in three-dimensional space. +Text positions are specified in modeling coordinates and transformed +into screen coordinates within the +rendering pipeline. +A text string has no surface from which to reflect light, so the light-source +illumination stage of the rendering pipeline has no effect. +Depth-cueing, if enabled, does affect the color of text primitives. +.LP +The attributes that affect regular text primitives are: +.ID +character expansion +character expansion asf +character height +character spacing +character spacing asf +character up vector +text alignment +text bundle index +text color +text color asf +text font index +text font index asf +text path +text precision +text precision asf +.DE +.LP +The text color is the intrinsic color of the text or annotation text +string. This color is affected by the depth-cueing computation, +if depth-cueing is enabled. +The resulting color is transformed, by the color approximation stage of the +rendering pipeline, into a color the device can display. +There are two output commands for setting the text color attribute. +The first allows an application to set the text color to a particular indexed +color value. The second +is more general, allowing the text color to be set to either an +indexed color value or a direct color value. +.LP +The text font index specifies which entry in the current font table +(i.e. which font group) is to be used. Character glyph definitions are +obtained from the +font resource identifiers stored in the font table entry indicated +by the text font index. +.LP +The remaining attributes are defined exactly as they are for PHIGS. +Examples of the functionality and use of each is found in the PHIGS +specification document. (See PHIGS functional specification, +ISO/IEC 9592-1:1988, section 4.5.5) +.LP +When a text or annotation text primitive is rendered, attributes are +obtained directly from the current pipeline state or indirectly from a text +bundle table. The source for the attribute value is determined by the current +settings of the corresponding ASFs. If an attribute's +ASF is set to +.PN PEXIndividual , +the attribute value is obtained directly from the +current pipeline state. If an attribute's ASF is set to +.PN PEXBundled , +the +attribute value is obtained from the current text bundle table. The text bundle +table entry used is indicated by the text bundle index attribute. Text +color asf, text font index asf, text precision asf, character expansion +asf, and character spacing asf are attributes which control the source +of text attribute values. +.LP +The treatment of text and annotation text strings during hidden surface +computations depends on the HLHSR mode selected and its implementation. +Z-buffer algorithms usually perform the hidden surface computation on +the 2D realization of the text string. Scan-line algorithms may determine +visibility for text strings only from the 3D positions of each string. Clipping +of text strings is dependent on the text precision attribute. If the text +precision is +.PN PEXStringPrecision , +clipping is done in an implementation-dependent fashion. +If the text precision is +.PN PEXCharPrecision , +clipping is done on at least a +character-by-character basis. If the text precision is +.PN PEXStrokePrecision , +each character is clipped to the clipping boundaries. +.NH 3 +Annotation Text +.XS +\*(SN Annotation Text +.XE +.LP +.IN "annotation text" +.IN "text" "annotation" +.IN "primitives" "annotation text" +Annotation text primitives and text primitives are the same except that +annotation primitives must appear parallel to the viewing surface. +Some attributes are shared with text primitives, and other +text attributes are duplicated to provide independent control over +annotation text appearance. The annotation text style attribute +specifies whether a connecting +line is rendered from the reference point to the annotation text string. +Supported values for annotation text style are inquirable via +.PN PEXGetEnumTypeInfo . +If the style is +.PN PEXATextConnected , +the connecting line is rendered with the current polyline attributes. +.LP +The attributes that affect annotation text primitives are: +.ID +annotation text alignment +annotation text height +annotation text path +annotation text style +annotation text up vector +character expansion +character expansion asf +character spacing +character spacing asf +text bundle index +text color +text color asf +text font index +text font index asf +text precision +text precision asf +.DE +.NH 3 +Polylines +.XS +\*(SN Polylines +.XE +.LP +.IN "polylines" +.IN "primitives" "polylines" +.IN "lines" +.IN "curves" +A polyline is specified as a list of vertices connected with line segments. +.LP +The attributes that affect polyline primitives are: +.ID +line bundle index +line color +line color asf +line type +line type asf +line width +line width asf +polyline interpolation +polyline interpolation asf +.DE +The line color is the intrinsic color for line primitives without vertex colors. +This color is affected by the depth-cueing computation, +if depth-cueing is enabled. +The resulting color is then transformed, by the color approximation stage of the +rendering pipeline, into a color the device can display. +There are two output commands for setting the line color attribute. +The first allows an application to set the line color to a particular indexed +color value. The second +is more general, allowing the line color to be set to either an +indexed color value or a direct color value. +.LP +The line type indicates the visual style of line primitives +rendered on the screen. +Supported values for line type are inquirable via +.PN PEXGetEnumTypeInfo . +For lines types other than +.PN PEXLineTypeSolid , +the length +of dots, dashes, and spaces is implementation-dependent. The line width +attribute is a scale factor that is multiplied by the nominal line width +for the display. (See +.PN PEXGetImpDepConstants .) +The line type and line width attributes are applied to the +2D projection of the line in device coordinates, +not to the 3D primitive itself. +.LP +Polyline set primitives may include a color value at each vertex. When vertex +colors are provided, they take precedence over the line color attribute. The +polyline +interpolation method controls how color values provided at the vertices are +used when rendering polylines. If the polyline interpolation method is +.PN PEXPolylineInterpNone +and colors are provided at the vertices, +the color of the ith vertex will be +used to render the line between the ith and the i+1th vertices (leaving +the color for last vertex unused) rendering +each polyline segment in a constant color. If the +interpolation method is +.PN PEXPolylineInterpColor , +a linear interpolation is +performed between the vertex colors to render points along each line segment. +The interpolated colors are then depth-cued and transformed into device +colors. +.LP +When a line primitive is rendered, each attribute is obtained directly from +the current pipeline state, or indirectly from a line bundle table. The +source for the attribute value is determined by the current settings of the +corresponding ASFs. If an attribute's ASF is set to +.PN PEXIndividual , +the attribute value is obtained directly from the current +pipeline state. If an attribute's ASF is set to +.PN PEXBundled , +the attribute value +is obtained from the current line bundle table. The line bundle table entry to +be used is indicated by the line bundle index attribute. Line color asf, +line type asf, line width asf, and polyline interpolation asf are +attributes which control source of polyline attribute values. +.NH 3 +Non-Uniform Rational B-Spline Curves +.XS +\*(SN Non-Uniform Rational B-Spline Curves +.XE +.LP +.IN "B-spline curves" +.IN "primitives" "B-spline curves" +Non-uniform B-spline curves are defined as a +list of knot values and a set of control points. +.LP +The attributes that affect non-uniform B-spline curve primitives are: +.ID +curve approximation +curve approximation asf +line bundle index +line color +line color asf +line type +line type asf +line width +line width asf +.DE +.LP +Non-uniform B-spline curves use all of the attributes of polylines, except for +the polyline interpolation method. These curves also use +the curve approximation attribute to define the fidelity +with which non-uniform B-spline curves are rendered. +Supported values for curve approximation are inquirable via +.PN PEXGetEnumTypeInfo . +.NH 3 +Fill Areas +.XS +\*(SN Fill Areas +.XE +.LP +.IN "fill areas" +.IN "primitives" "fill areas" +Fill areas are a type of surface primitive. +A surface extending beyond the clipping boundary is clipped, and only the +portion within the clipping boundary is rendered. Surfaces are the only output +primitives affected by the reflectance calculations. Surface +primitives include fill area (with and without data), fill area set +(with and without data), set of fill area sets, +triangle strip, quadrilateral mesh, and non-uniform B-spline surface. +.LP +A fill area is a sequence of points defining the boundary of a planar +surface. The last point is always implicitly connected to the first point +so the area is closed. Fill areas are not required to be strictly +planar, but shading artifacts may occur if the fill area is not +planar or nearly so. +The odd-even rule is used for determining the area that lies in the interior +of the fill area. +.LP +Part of the definition of a fill area is the shape specification. This +parameter is used to indicate whether the shape of +the fill area is +.PN PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex +or +.PN PEXShapeUnknown . +A shape of +.PN PEXShapeComplex +means the fill area may have self-intersecting +edges. +A shape of +.PN PEXShapeNonConvex +means the fill area has no self-intersecting edges +but some of the interior angles are not convex. +A shape of +.PN PEXShapeConvex +means all of the fill area's interior angles are +convex. +A shape of +.PN PEXShapeUnknown +means the shape of the fill area is not known. +The server will have to determine its shape or assume +it is +.PN PEXShapeComplex . +.LP +The attributes that affect fill area (all surface) primitives are: +.ID +back-face surface color +back-face surface color asf +back-face surface interior style +back-face surface interior style asf +back-face surface interior style index +back-face surface interior style index asf +back-face surface interpolation method +back-face surface interpolation method asf +back-face surface reflection attributes +back-face surface reflection attributes asf +back-face surface reflection model +back-face surface reflection model asf +facet culling mode +facet distinguish flag +interior bundle index +light state +pattern reference point +pattern reference vectors +pattern size +surface color +surface color asf +surface interior style +surface interior style asf +surface interior style index +surface interior style index asf +surface interpolation method +surface interpolation method asf +surface reflection attributes +surface reflection attributes asf +surface reflection model +surface reflection model asf +surface edge color +surface edge color asf +surface edge type +surface edge type asf +surface edge width +surface edge width asf +surface edge bundle index +surface edges +surface edges asf +.DE +.LP +If the facet distinguish flag is enabled then all back-facing surfaces will +be rendered using the back-facing attribute values. The culling mode +must be set to +.PN PEXNone , +.PN PEXBackFaces +or +.PN PEXFrontFaces . +This determines whether no surfaces are culled, back-facing surfaces are culled +or front-facing surfaces are culled. +The facet normal, either the one supplied or, if not supplied, the one computed, +for each facet is used to determine whether the facet is front-facing or +back-facing. +.LP +The surface color +is affected by the reflectance calculations (which utilizes the interior +style, the reflection model and reflection attributes) and the depth-cueing +computations. +The resulting color is then transformed, by the color approximation stage of the +rendering pipeline, into a color the device can display. +.LP +The interior style determines how the interior of the fill area is +rendered. +Supported values for surface interior style are inquirable via +.PN PEXGetEnumTypeInfo . +An interior style of +.PN PEXInteriorStyleEmpty +means the interior is not rendered at all. +An interior style of +.PN PEXInteriorStyleSolid +means the interior is solid filled. +An interior style of +.PN PEXInteriorStyleHollow +means only the boundary of the +interior area is rendered, and if the fill area is clipped, the boundary along the +clipped edge is also rendered. +An interior style of +.PN PEXInteriorStylePattern +means the interior is pattern filled using the pattern attributes (pattern +reference point, pattern reference vectors and pattern size). +An interior style of +.PN PEXInteriorStyleHatch +means the interior is hatch filled. +.LP +The light state specifies indices into the light table of those entries (or +lights) which are currently enabled. If the light table contains defined +entries that are not referenced by the light state attribute, those lights +are disabled. +.LP +The reflection model specifies the method that is used to perform the +reflectance calculations when rendering surface primitives. +Supported values for reflection model are inquirable via +.PN PEXGetEnumTypeInfo . +If the reflection model is +.PN PEXReflectionNone +then no reflectance calculation is performed. +If the reflection model is +.PN PEXReflectionAmbient +then only the ambient terms of the lighting equation are used. +If the reflection model is +.PN PEXReflectionDiffuse +then only the ambient and diffuse terms of the lighting equation are used. +If the reflection model is +.PN PEXReflectionSpecular +then the ambient, diffuse and specular terms of the lighting equation are all +used during the reflectance calculations. +.LP +The reflection attributes indicate how a primitive reflects light. +These include ambient, diffuse and specular coefficients, the +specular concentration and color, and the transmission coefficient (also +thought of as a transparency coefficient). +.LP +The surface interpolation method controls how shading is performed +when rendering surface primitives. +Supported values for surface interpolation method are inquirable via +.PN PEXGetEnumTypeInfo . +If the surface interpolation method is +.PN PEXSurfaceInterpNone +then the color resulting from a single light source computation is used for +the entire surface. +If the surface interpolation method is +.PN PEXSurfaceInterpColor +then the colors are computed at the vertices of the surface according to the +current reflection model. These color values are then linearly interpolated +across the interior of the surface or the edges. +If the surface interpolation method is +.PN PEXSurfaceInterpDotProduct +then the lighting equation dot products are computed at the vertices. These +dot products are linearly interpolated and the reflectance calculation +is applied using these values to compute the color value at each pixel in the +interior of a surface or along a surface edge. +If the surface interpolation method is +.PN PEXSurfaceInterpNormal +then an attempt is made to interpolate the normal across the facet and perform +the reflectance calculation as accurately as possible at each pixel in +the interior of a surface or along a surface edge. +.LP +When a surface is rendered, each attribute is obtained directly from +the current pipeline state, or indirectly from the interior bundle table. The +source for the attribute value is determined by the current settings of the +corresponding ASFs. If an attribute's ASF is set to +.PN PEXIndividual , +the attribute value is obtained directly from the current +pipeline state. If an attribute's ASF is set to +.PN PEXBundled , +the attribute value +is obtained from the current interior bundle table. The interior bundle table +entry to be used is indicated by the interior bundle index attribute. +Surface interior style asf, surface interior style index asf, +surface color asf, surface reflection attributes asf, surface reflection model asf, +surface interpolation method asf, back-face surface interior style asf, +back-face surface interior style index asf, back-face surface surface color asf, +back-face surface reflection attributes asf, back-face surface reflection model +asf and back-face surface interpolation method asf +are attributes which control the source of fill area attribute values. +.LP +The surface edges attribute indicates whether fill area edges are rendered in +addition to fill area interiors. Surface edges for fill areas are the edges of +each fill area. If surface edges are rendered, the surface edge color, surface +edge type, and surface edge width are used to render them. These attributes +are analogous to the attributes that affect line primitives. Surface edge +colors are depth-cued but are not affected by light-source computations. +Surface edge type and width, like line type and width, are raster attributes +applied after the surface edge has been transformed into device coordinates. +Edges are considered to be rendered "on top of" fill area interiors. This means +that surface edges, when enabled, should be visible no matter what interior +style is used. Parts of clipped surface edges are not visible (no new edge is +generated by the clipping process). Also the source of the edge attribute +value is determined by the surface edge color asf, surface edge type asf, +and surface edge width asf. +.LP +Some fill area primitives allow additional data for the facet and for each +vertex. +If a color value is specified for the facet, it is taken to be the +intrinsic color of the surface and is used instead of the current surface color +when the fill area is rendered. +Vertex colors take precedence over facet colors which override the surface +color attributes. +A normal specified for the fill area facet is assumed to be +a surface normal for the facet and is used for back-facing surface processing. +This normal may also be used in reflectance calculations. +If no fill area facet normal is +provided, one is computed by determining the first three non-colinear vertices +A, B, and C, and computing the cross product of the vector from A to B with the +vector from A to C. If the fill area is degenerate (for example, does not +contain three non-colinear vertices), the resultant value of the normal is +implementation-dependent. +.NH 3 +Fill Area Sets +.XS +\*(SN Fill Area Sets +.XE +.LP +.IN "fill area sets" +.LP +A fill area set consists of multiple fill areas, each of +which defines a "contour", "island" or a "hole" that is part +of a single, planar, area-defining output primitive. All of the +fill area attributes described in the section on fill areas apply to +fill area sets. If a normal +is not provided for the fill area set then it is computed, using the +method described in the section on fill areas, for the first contour. +.LP +Part of the definition of a fill area set is the contour hint flag. This +parameter is used to indicate whether the contours are +.PN PEXContourDisjoint , +.PN PEXContourNested , +.PN PEXContourIntersecting +or +.PN PEXContourUnknown . +A contour hint of +.PN PEXContourDisjoint +means all contours are spatially disjoint. No +overlapping or intersection occurs between any contours in the fill area +set. A +contour hint of +.PN PEXContourNested +means the contours are either disjoint or +wholly contained within another contour. No contour will have edges that +intersect or are coincident with edges of any other contour. A +contour hint of +.PN PEXContourIntersecting +means that separate contours may have +edges that are coincident or overlap. A +contour hint of +.PN PEXContourUnknown +means nothing is known about the +relationships between the contours. Fill area sets with contours that +have higher complexity interrelationships than that indicated by their +contour hint parameter are rendered in an implementation-dependent manner. +.LP +A set of fill area sets may be connected where individual +fill area sets may share geometry and attribute information at vertices. +Each fill area set defines a planar surface, but each fill area set is not +necessarily co-planar with the other fill area sets. +One benefit to the set of fill area sets primitive is that data is +transmitted across the network once per unique vertex instead of once for +every fill area set sharing the vertex. +An additional parameter specifies whether the contours are all 1, i.e. there is +only one contour in each fill area set. If +.PN True , +then each fill area set in the SOFAS consists of a single facet, or fill area. +.NH 3 +Triangle Strips +.XS +\*(SN Triangle Strips +.XE +.LP +.IN "triangle strips" +.IN "primitives" "triangle strips" +A triangle strip is specified as a list of n vertices that +represent n-2 triangles. For each value of i less than +or equal to n-2, the ith, i+1th, and i+2th +vertices define a triangle. Geometric normals are computed +in the same way as described for fill areas, except that the order +of vertices is reversed for even-numbered triangles in the triangle strip. +The set of triangles need not be co-planar. +.LP +All of the fill area attributes described in the section on fill areas, +except for the shape flag, affect triangle strips. +The surface edges for triangle strips are the line segments forming the +boundaries of all triangles in the strip. There is only one edge between any +two adjacent triangles. +.NH 3 +Quadrilateral Meshes +.XS +\*(SN Quadrilateral Meshes +.XE +.LP +.IN "quadrilateral meshes" +.IN "primitives" "quadrilateral meshes" +A quadrilateral mesh is specified as an array of +vertices representing quadrilaterals. For each +i less than the number of rows minus one and each j less than the number of +columns minus one, a quadrilateral is formed by the vertices +(i,j), (i+1,j), (i+1,j+1) and (i,j+1). +Normals are assumed to be unit length vectors. +Normals for quadrilaterals, if not provided explicitly, are computed by taking +the cross product of the diagonals. For a quadrilateral with the above +vertices, the cross product would be formed as follows: +.ID +normal(i,j) = (point(i+1, j+1) - point(i, j)) X (point(i, j+1) - point(i+1, j)) +.DE +The set of quadrilaterals need not be co-planar, however, each individual +quadrilateral is assumed to be planar. +.LP +All of the fill area attributes described in the section on fill areas affect +quadrilateral meshes. +The surface edges for quadrilateral meshes are the line segments forming the +boundaries of the individual quadrilaterals in the mesh. There is only one +edge between any two adjacent quadrilaterals. +.NH 3 +Non-Uniform Rational B-Spline Surfaces +.XS +\*(SN Non-Uniform Rational B-Spline Surfaces +.XE +.LP +.IN "B-spline surfaces" +.IN "primitives" "B-spline surfaces" +A non-uniform B-spline surface is +a B-spline surface specified by two lists of knot values +and a set of control points. +A set of trimming loops may be specified along with the data +for a non-uniform B-spline surface to specify those areas +of the surface to be rendered. +.LP +Non-uniform rational B-spline surfaces are affected by the following +list of attributes in addition to the fill area attributes described in the +section on fill areas: +.ID +parametric surface characteristics +surface approximation +surface approximation asf +.DE +.LP +The surface approximation defines the approximation +method and accuracy with which non-uniform B-spline surfaces are rendered. +Supported values for surface approximation are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +The parametric surface characteristics defines the surface characteristics. +Supported values for parametric surface characteristics are inquirable via +.PN PEXGetEnumTypeInfo . +.NH 3 +Cell Arrays +.XS +\*(SN Cell Arrays +.XE +.LP +.IN "cell arrays" +.IN "primitives" "cell arrays" +A cell array is a parallelogram of equal-sized cells, each of which +is a parallelogram and has a single color. +The attributes affecting cell arrays are those listed in +\fI2.1: Primitives and Attributes\fP. +.NH 3 +Generalized Drawing Primitives +.XS +\*(SN Generalized Drawing Primitives +.XE +.LP +.IN "GDPs" +.IN "generalized drawing primitives" +.IN "primitives" "generalized drawing primitives" +A generalized drawing primitive (GDP) output command is provided. +This allows individual implementations to extend the supported primitive set. +There are no standard PEX GDPs. +The complete interface and behavior for each specified GDP identifier +should be available with the individual PEX implementations. +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter02.2 b/xc/doc/specs/PEX5/PEXlib/chapter02.2 new file mode 100644 index 000000000..9579ddc88 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter02.2 @@ -0,0 +1,4122 @@ +.NH 2 +Output Primitive Functions +.XS +\*(SN Output Primitive Functions +.XE +.IN "output commands" +.IN "primitives" +.LP +This section describes all the output primitive functions. +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.sp +typedef struct { + unsigned long count; /* number of points */ + PEXCoord *points; +} PEXListOfCoord; /* Pointer to an array of 3D points */ +.sp +typedef struct { + unsigned long count; /* number of points */ + PEXCoord2D *points; +} PEXListOfCoord2D; /* Pointer to an array of 2D points */ +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.DE +/* facet data */ +.ID +typedef union { + PEXColorIndexed index; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; + PEXVector normal; + PEXColorIndexedNormal index_normal; + PEXColorRGBNormal rgb_normal; + PEXColorHSVNormal hsv_normal; + PEXColorHLSNormal hls_normal; + PEXColorCIENormal cie_normal; + PEXColorRGB8Normal rgb8_normal; + PEXColorRGB16Normal rgb16_normal; +} PEXFacetData; +.sp +typedef union { + PEXColorIndexed *index; + PEXColorRGB *rgb; + PEXColorHSV *hsv; + PEXColorHLS *hls; + PEXColorCIE *cie; + PEXColorRGB8 *rgb8; + PEXColorRGB16 *rgb16; + PEXVector *normal; + PEXColorIndexedNormal *index_normal; + PEXColorRGBNormal *rgb_normal; + PEXColorCIENormal *cie_normal; + PEXColorHSVNormal *hsv_normal; + PEXColorHLSNormal *hls_normal; + PEXColorRGB8Normal *rgb8_normal; + PEXColorRGB16Normal *rgb16_normal; +} PEXArrayOfFacetData; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef unsigned short PEXTableIndex; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.sp +typedef struct { + PEXColorIndexed index; + PEXVector normal; +} PEXColorIndexedNormal; +.sp +typedef struct { + PEXColorRGB rgb; + PEXVector normal; +} PEXColorRGBNormal; +.sp +typedef struct { + PEXColorCIE cie; + PEXVector normal; +} PEXColorCIENormal; +.sp +typedef struct { + PEXColorHSV hsv; + PEXVector normal; +} PEXColorHSVNormal; +.sp +typedef struct { + PEXColorHLS hls; + PEXVector normal; +} PEXColorHLSNormal; +.sp +typedef struct { + PEXColorRGB8 rgb8; + PEXVector normal; +} PEXColorRGB8Normal; +.sp +typedef struct { + PEXColorRGB16 rgb16; + PEXVector normal; +} PEXColorRGB16Normal; +.DE +/* vertex data */ +.ID +typedef struct { + unsigned long count; /* number of vertices */ + PEXArrayOfVertex vertices; /* pointer to vertices */ +} PEXListOfVertex; +.sp +typedef union { + PEXCoord *no_data; + PEXVertexIndexed *index; + PEXVertexRGB *rgb; + PEXVertexHSV *hsv; + PEXVertexHLS *hls; + PEXVertexCIE *cie; + PEXVertexRGB8 *rgb8; + PEXVertexRGB16 *rgb16; + PEXVertexNormal *normal; + PEXVertexEdge *edge; + PEXVertexIndexedNormal *index_normal; + PEXVertexRGBNormal *rgb_normal; + PEXVertexHSVNormal *hsv_normal; + PEXVertexHLSNormal *hls_normal; + PEXVertexCIENormal *cie_normal; + PEXVertexRGB8Normal *rgb8_normal; + PEXVertexRGB16Normal *rgb16_normal; + PEXVertexIndexedEdge *index_edge; + PEXVertexRGBEdge *rgb_edge; + PEXVertexHSVEdge *hsv_edge; + PEXVertexHLSEdge *hls_edge; + PEXVertexCIEEdge *cie_edge; + PEXVertexRGB8Edge *rgb8_edge; + PEXVertexRGB16Edge *rgb16_edge; + PEXVertexNormalEdge *normal_edge; + PEXVertexIndexedNormalEdge *index_normal_edge; + PEXVertexRGBNormalEdge *rgb_normal_edge; + PEXVertexHSVNormalEdge *hsv_normal_edge; + PEXVertexHLSNormalEdge *hls_normal_edge; + PEXVertexCIENormalEdge *cie_normal_edge; + PEXVertexRGB8NormalEdge *rgb8_normal_edge; + PEXVertexRGB16NormalEdge *rgb16_normal_edge; +} PEXArrayOfVertex; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; +} PEXVertexIndexed; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; +} PEXVertexRGB; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; +} PEXVertexHSV; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; +} PEXVertexHLS; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; +} PEXVertexCIE; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; +} PEXVertexRGB8; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; +} PEXVertexRGB16; +.sp +typedef struct { + PEXCoord point; + PEXVector normal; +} PEXVertexNormal; +.sp +typedef struct { + PEXCoord point; + unsigned int edge; +} PEXVertexEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + PEXVector normal; +} PEXVertexIndexedNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + PEXVector normal; +} PEXVertexRGBNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + PEXVector normal; +} PEXVertexHSVNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + PEXVector normal; +} PEXVertexHLSNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + PEXVector normal; +} PEXVertexCIENormal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + PEXVector normal; +} PEXVertexRGB8Normal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + PEXVector normal; +} PEXVertexRGB16Normal; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + unsigned int edge; +} PEXVertexIndexedEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + unsigned int edge; +} PEXVertexRGBEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + unsigned int edge; +} PEXVertexHSVEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + unsigned int edge; +} PEXVertexHLSEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + unsigned int edge; +} PEXVertexCIEEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + unsigned int edge; +} PEXVertexRGB8Edge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + unsigned int edge; +} PEXVertexRGB16Edge; +.sp +typedef struct { + PEXCoord point; + PEXVector normal; + unsigned int edge; +} PEXVertexNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + PEXVector normal; + unsigned int edge; +} PEXVertexIndexedNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + PEXVector normal; + unsigned int edge; +} PEXVertexRGBNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + PEXVector normal; + unsigned int edge; +} PEXVertexHSVNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + PEXVector normal; + unsigned int edge; +} PEXVertexHLSNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + PEXVector normal; + unsigned int edge; +} PEXVertexCIENormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + PEXVector normal; + unsigned int edge; +} PEXVertexRGB8NormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + PEXVector normal; + unsigned int edge; +} PEXVertexRGB16NormalEdge; +.DE +/* similar to XErrorEvent - use to access additional info in OC error */ +.ID +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XID resourceid; /* resource id of renderer or structure */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error code of failed request */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ + unsigned short op_code; /* op-code of failed output command */ + unsigned short count; /* number of output commands successfully */ + /* executed before error */ +} PEXOCErrorEvent; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXAnnotationText - 3D Annotation Text Primitive +.XS + PEXAnnotationText +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXAnnotationText\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIorigin\fP\^, PEXCoord *\fIoffset\fP\^, int \fIlength\fP\^, char *\fIstring\fP\^) +.FN +.RE +.IN "PEXAnnotationText" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIoffset\fP 1i +The relative position of the text string from the origin. +.IP \fIlength\fP 1i +The number of bytes in the text string. +.IP \fIstring\fP 1i +A pointer to the text string. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an annotation text output primitive. +.LP +The first character set in the text font will be used. +.LP +The origin +defines, in modeling coordinates, the position of the +first character in the text string. +The offset specifies an offset from the origin in normalized +projection coordinates. The point where the text string is +placed is called the annotation point. The annotation point is +computed by adding the value of offset to the transformed +origin point. The z-component of the annotation point +specifies the x-y plane in normalized projection coordinate +space on which the annotation text string is placed. +.LP +Depending on the text attribute +source flag values, the text color, text precision, +character expansion, character spacing, and text font index attributes are +either obtained directly from +the current text attribute values or +from the entry in the text bundle +specified by the current text bundle index attribute. +The annotation text height, annotation text path, +annotation text alignment, annotation text up vector, +and annotation text style are also used to render the text string. +.LP +The annotation text string's color is affected only by the +depth-cueing computation (the reflectance stage of the +rendering pipeline affects only surface primitives) and is mapped to a +device color. The entire annotation text primitive is clipped +if the origin is clipped. If the origin is not clipped, the +annotation text is clipped according to text clipping rules. +The connection line, if any, is clipped according to +polyline clipping rules, except that modeling clipping is +ignored. The current set of polyline attributes is used to render the +connection line. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.PN PEXSetCharExpansion , +.br +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.PN PEXSetTextColor , +.br +.PN PEXSetATextHeight , +.PN PEXSetATextUpVector , +.PN PEXSetATextPath , +.br +.PN PEXSetATextAlignment , +.PN PEXSetATextStyle , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXAnnotationText2D - 2D Annotation Text Primitive +.XS + PEXAnnotationText2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXAnnotationText2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIorigin\fP\^, PEXCoord2D *\fIoffset\fP\^, int \fIlength\fP\^, char *\fIstring\fP\^) +.FN +.RE +.IN "PEXAnnotationText2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIoffset\fP 1i +The relative position of the text string from the origin. +.IP \fIlength\fP 1i +The number of bytes in the text string. +.IP \fIstring\fP 1i +A pointer to the text string. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D annotation text output primitive. +.LP +This primitive functions like +.PN PEXAnnotationText +except that the origin and offset positions are specified +using only x- and y-components, and the z-component is always +assumed to be zero. This primitive is two-dimensional only in +that the z-component is implied, since geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.PN PEXSetCharExpansion , +.br +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.PN PEXSetTextColor , +.br +.PN PEXSetATextHeight , +.PN PEXSetATextUpVector , +.PN PEXSetATextPath , +.br +.PN PEXSetATextAlignment , +.PN PEXSetATextStyle , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXCellArray - 3D Cell Array Primitive +.XS + PEXCellArray +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXCellArray\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIpoint1\fP\^, PEXCoord *\fIpoint2\fP\^, PEXCoord *\fIpoint3\fP\^, unsigned int \fIcol_count\fP\^, unsigned int \fIrow_count\fP\^, PEXTableIndex *\fIcolor_indices\fP\^) +.FN +.RE +.IN "PEXCellArray" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpoint1\fP 1i +The first cell array definition point. +.IP \fIpoint2\fP 1i +The second cell array definition point. +.IP \fIpoint3\fP 1i +The third cell array definition point. +.IP \fIcol_count\fP 1i +The number of cell columns (number of cells in the X direction). +.IP \fIrow_count\fP 1i +The number of cell rows (number of cells in the Y direction). +.IP \fIcolor_indices\fP 1i +An array of color table index values which specify the color of each cell. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 3D cell-array output primitive. +.LP +A 3D cell-array primitive is a parallelogram of equally-sized +cells, each of which is a parallelogram with a single color. +Each cell has a width defined by: +.DS C +.EQ +width ~=~ sqrt {(point1->x ~-~ point2->x) sup 2 ~+~ (point1->y ~-~ point2->y) sup 2 ~+~ (point1->z ~-~ point2->z) sup 2} over col_count +.EN +.DE +.IP +and a height defined by: +.DS C +.EQ +height ~=~ sqrt {(point1->x ~-~ point3->x) sup 2 ~+~ (point1->y ~-~ point3->y) sup 2 ~+~ (point1->z ~-~ point3->z) sup 2} over row_count +.EN +.DE +.LP +Cell colors are specified in a one-dimensional array where the colors are stored +in row-major order. +The first color in the array is the color at the cell at the +corner of point1, and subsequent colors represent the colors +of cells proceeding to point2. +.LP +If any color index is not defined, color index one is used. If color index +one is not defined, the resulting color is implementation-dependent. +The column count and row count can not be zero. +.RE +.SH +Data Structures +.ID +.Co +typedef unsigned short PEXTableIndex; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXCellArray2D - 2D Cell Array Primitive +.XS + PEXCellArray2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXCellArray2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIpoint1\fP\^, PEXCoord2D *\fIpoint2\fP\^, unsigned int \fIcol_count\fP\^, unsigned int \fIrow_count\fP\^, PEXTableIndex *\fIcolor_indices\fP\^) +.FN +.RE +.IN "PEXCellArray2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpoint1\fP 1i +The first cell array definition point. +.IP \fIpoint2\fP 1i +The second cell array definition point. +.IP \fIcol_count\fP 1i +The number of cell columns (number of cells in the X direction). +.IP \fIrow_count\fP 1i +The number of cell rows (number of cells in the Y direction). +.IP \fIcolor_indices\fP 1i +An array of color table index values which specify the color of each cell. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D cell array output primitive. +.LP +A 2D cell-array is a rectangle of equally-sized +cells, each of which is a rectangle which has a single color. +The primitive is specified by two points which define a rectangle +aligned with the modeling coordinate axes. +The width and height of each cell is defined as in +.PN PEXCellArray +where the z component is zero. +.LP +All other aspects of this primitive are the same as +.PN PEXCellArray . +.RE +.SH +Data Structures +.ID +.Co +typedef unsigned short PEXTableIndex; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXEncodedAnnoText - Encoded 3D Annotation Text Primitive +.XS + PEXEncodedAnnoText +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXEncodedAnnoText\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIorigin\fP\^, PEXCoord *\fIoffset\fP\^, unsigned int \fIcount\fP\^, PEXEncodedTextData *\fIencoded_text\fP\^) +.FN +.RE +.IN "PEXEncodedAnnoText" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIoffset\fP 1i +The relative position of the text string from the origin. +.IP \fIcount\fP 1i +The number of encoded text strings. +.IP \fIencoded_text\fP 1i +An array of encoded text strings. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an annotation text output primitive. +.LP +This function is similar to +.PN PEXAnnotationText , +except +that multiple encoded text strings are specified. Each text +string in the encoded text array has a character set, a character +set width, an encoding state, and a list of characters. +.LP +The character +set is an index into the current font group. Font groups contain +individual fonts which are numbered starting at one; a value of +three selects the third font in the font group currently being +used. If a character set is not available in the current font +group then the entire string will be rendered using the default +font group. If a character set value is not available in the +default font group then that portion of the string will be rendered +in an implementation-dependent manner. The character set width indicates +the width or size of characters in the strings. +Valid values for character set width are +.PN PEXCSByte , +.PN PEXCSShort +and +.PN PEXCSLong . +The encoding state is provided for use by the application and is not +interpreted by the PEX server. +.LP +All other aspects of this primitive are the same as +.PN PEXAnnotationText . +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short character_set; + unsigned char character_set_width; /* PEXCSByte, PEXCSShort, PEXCSLong */ + unsigned char encoding_state; + unsigned short reserved; + unsigned short length; + char *ch; +} PEXEncodedTextData; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.PN PEXSetCharExpansion , +.br +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.PN PEXSetTextColor , +.br +.PN PEXSetATextHeight , +.PN PEXSetATextUpVector , +.PN PEXSetATextPath , +.br +.PN PEXSetATextAlignment , +.PN PEXSetATextStyle , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXEncodedAnnoText2D - Encoded 2D Annotation Text Primitive +.XS + PEXEncodedAnnoText2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXEncodedAnnoText2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIorigin\fP\^, PEXCoord2D *\fIoffset\fP\^, unsigned int \fIcount\fP\^, PEXEncodedTextData *\fIencoded_text\fP\^) +.FN +.RE +.IN "PEXEncodedAnnoText2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIoffset\fP 1i +The relative position of the text string from the origin. +.IP \fIcount\fP 1i +The number of encoded text strings. +.IP \fIencoded_text\fP 1i +An array of encoded text strings. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D annotation text output primitive. +.LP +This function is similar to +.PN PEXAnnotationText2D , +except +that multiple encoded text strings are specified. Each text +string in the encoded text array has a character set, a character +set width, an encoding state, and a list of characters. +.LP +The character +set is an index into the current font group. Font groups contain +individual fonts which are numbered starting at one; a value of +three selects the third font in the font group currently being +used. If a character set is not available in the current font +group then the entire string will be rendered using the default +font group. If a character set value is not available in the +default font group then that portion of the string will be rendered +in an implementation-dependent manner. The character set width indicates +the width or size of characters in the strings. +Valid values for character set width are +.PN PEXCSByte , +.PN PEXCSShort +and +.PN PEXCSLong . +The encoding state is provided for use by the application and is not +interpreted by the PEX server. +.LP +All other aspects of this primitive are the same as +.PN PEXAnnotationText2D . +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short character_set; + unsigned char character_set_width; /* PEXCSByte, PEXCSShort, PEXCSLong */ + unsigned char encoding_state; + unsigned short reserved; + unsigned short length; + char *ch; +} PEXEncodedTextData; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.PN PEXSetCharExpansion , +.br +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.PN PEXSetTextColor , +.br +.PN PEXSetATextHeight , +.PN PEXSetATextUpVector , +.PN PEXSetATextPath , +.br +.PN PEXSetATextAlignment , +.PN PEXSetATextStyle , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXEncodedText - Encoded 3D Text Primitive +.XS + PEXEncodedText +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXEncodedText\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIorigin\fP\^, PEXVector *\fIvector1\fP\^, PEXVector *\fIvector2\fP\^, unsigned int \fIcount\fP\^, PEXEncodedTextData *\fIencoded_text\fP\^) +.FN +.RE +.IN "PEXEncodedText" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIvector1\fP 1i +A vector defining the positive x-direction of the text local coordinate system. +.IP \fIvector2\fP 1i +A vector defining the positive y-direction of the text local coordinate system. +.IP \fIcount\fP 1i +The number of encoded text strings. +.IP \fIencoded_text\fP 1i +An array of encoded text strings. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a text output primitive. +.LP +This function is similar to +.PN PEXText , +except +that multiple encoded text strings are specified. Each text +string in encoded text array has a character set, a character +set width, an encoding state, and a list of characters. +.LP +The character +set is an index into the current font group. Font groups contain +individual fonts which are numbered starting at one; a value of +three selects the third font in the font group currently being +used. If a character set is not available in the current font +group then the entire string will be rendered using the default +font group. If a character set value is not available in the +default font group then that portion of the string will be rendered +in an implementation-dependent manner. The character set width indicates +the width or size of characters in the strings. +Valid values for character set width are +.PN PEXCSByte , +.PN PEXCSShort +and +.PN PEXCSLong . +The encoding state is provided for use by the application and is not +interpreted by the PEX server. +.LP +All other aspects of this primitive are the same as +.PN PEXText . +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short character_set; + unsigned char character_set_width; /* PEXCSByte, PEXCSShort, PEXCSLong */ + unsigned char encoding_state; + unsigned short reserved; + unsigned short length; + char *ch; +} PEXEncodedTextData; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.br +.PN PEXSetCharExpansion , +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.br +.PN PEXSetTextColor , +.PN PEXSetCharHeight , +.PN PEXSetCharUpVector , +.br +.PN PEXSetTextPath , +.PN PEXSetTextAlignment , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXEncodedText2D - Encoded 2D Text Primitive +.XS + PEXEncodedText2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXEncodedText2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIorigin\fP\^, unsigned int \fIcount\fP\^, PEXEncodedTextData *\fIencoded_text\fP\^) +.FN +.RE +.IN "PEXEncodedText2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIcount\fP 1i +The number of encoded text strings. +.IP \fIencoded_text\fP 1i +An array of encoded text strings. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D text output primitive. +.LP +This function is similar to +.PN PEXText2D , +except +that multiple encoded text strings are specified. Each text +string in encoded text array has a character set, a character +set width, an encoding state, and a list of characters. +.LP +The character +set is an index into the current font group. Font groups contain +individual fonts which are numbered starting at one; a value of +three selects the third font in the font group currently being +used. If a character set is not available in the current font +group then the entire string will be rendered using the default +font group. If a character set value is not available in the +default font group then that portion of the string will be rendered +in an implementation-dependent manner. The character set width indicates +the width or size of characters in the strings. +Valid values for character set width are +.PN PEXCSByte , +.PN PEXCSShort +and +.PN PEXCSLong . +The encoding state is provided for use by the application and is not +interpreted by the PEX server. +.LP +All other aspects of this primitive are the same as +.PN PEXText2D . +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short character_set; + unsigned char character_set_width; /* PEXCSByte, PEXCSShort, PEXCSLong */ + unsigned char encoding_state; + unsigned short reserved; + unsigned short length; + char *ch; +} PEXEncodedTextData; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.br +.PN PEXSetCharExpansion , +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.br +.PN PEXSetTextColor , +.PN PEXSetCharHeight , +.PN PEXSetCharUpVector , +.br +.PN PEXSetTextPath , +.PN PEXSetTextAlignment , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXExtendedCellArray - Extended 3D Cell Array Primitive +.XS + PEXExtendedCellArray +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXExtendedCellArray\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIpoint1\fP\^, PEXCoord *\fIpoint2\fP\^, PEXCoord *\fIpoint3\fP\^, unsigned int \fIcol_count\fP\^, unsigned int \fIrow_count\fP\^, int \fIcolor_type\fP\^, PEXArrayOfColor \fIcolors\fP\^) +.FN +.RE +.IN "PEXExtendedCellArray" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpoint1\fP 1i +The first cell array definition point. +.IP \fIpoint2\fP 1i +The second cell array definition point. +.IP \fIpoint3\fP 1i +The third cell array definition point. +.IP \fIcol_count\fP 1i +The number of cell columns (number of cells in the X direction). +.IP \fIrow_count\fP 1i +The number of cell rows (number of cells in the Y direction). +.IP \fIcolor_type\fP 1i +The type of color for the cell colors +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolors\fP 1i +An array of colors specifying the color of each cell. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 3D cell array output primitive. +.LP +This function is similar to +.PN PEXCellArray , +except the colors are passed as either +indexed color values or direct color values, depending on the color type. +.RE +.SH +Data Structures +.ID +.Co +typedef union { + PEXColorIndexed *indexed; + PEXColorRGB *rgb; + PEXColorHSV *hsv; + PEXColorHLS *hls; + PEXColorCIE *cie; + PEXColorRGB8 *rgb8; + PEXColorRGB16 *rgb16; +} PEXArrayOfColor; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXFillArea - 3D Fill Area Primitive +.XS + PEXFillArea +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillArea\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, unsigned int \fIcount\fP\^, PEXCoord *\fIpoints\fP\^) +.FN +.RE +.IN "PEXFillArea" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape of the fill area +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points defining the fill area. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a fill area output primitive. +.LP +The area is defined by the list of points joined together to form a planar +surface. +Fill areas are not strictly required to be planar, +but shading artifacts may occur if a fill area is not planar or +nearly so. The first vertex of the fill area is connected to the +second, the second to the third, and so on. The last vertex is +implicitly connected to the first. +.LP +During the rendering process, the fill area vertices are +transformed to positions in device coordinates. The surface +colors are affected by the reflectance calculations +which uses the light state, interior style, +and reflection model attributes. Surface colors are further affected +by the depth-cueing computation and then mapped to device colors. +Fill areas outside the currently-defined clipping volume are +not displayed. Fill areas crossing the clipping volume are +clipped, and only the portions inside the clipping volume are displayed. +.LP +A fill area with fewer than three vertices is considered +degenerate. It is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.LP +A fill area may cross over itself to create a complex shape. The odd-even +rule is used for determining the area that lies in the interior of the fill +area. +The shape hint is provided to enable performance improvements +for certain shapes. +Fill areas that are of higher complexity than indicated by the shape hint +are rendered +in an implementation-dependent manner. Consequently, +applications should pass +.PN PEXShapeUnknown +as the shape unless they are +certain the fill area's shape is one of the other three. +.LP +The ignore edges flag is a boolean value specifying whether surface edges +are rendered. If the flag is +.PN True , +no surface edges are +rendered for the fill area. If the ignore edges flag is +.PN False , +surface edges are rendered according to the surface edge attributes if +the surface edge flag attribute is +.PN PEXOn . +Depending on the setting of the surface edge ASF values, +the surface edges, surface edge color, surface +edge type, and surface edge width attributes are obtained from one +of two sources. These attributes are obtained directly from +the current surface edge attribute values or from the +edge bundle lookup table entry specified by the current edge +bundle index attribute +depending on the setting of the surface edge ASF attribute. +.LP +Depending on the setting of the surface attribute ASF values, the +surface color, interior style, interior style index, +surface interpolation method, and reflection model attributes are +obtained from one of two sources. These attributes are obtained +directly from the current surface attributes values or +from the interior bundle lookup table entry specified by the current +interior bundle index attribute. +.LP +When a surface is rendered, the surface color and reflection attributes +are used to +compute the colors of the surface if it is front-facing with respect to +the point of view and the current culling mode allows +front-faces to be rendered. If the surface is back-facing, the current +distinguish mode is +.PN True , +and the current culling mode allows +back-faces to be rendered, the corresponding back-facing attributes +are used instead. +.LP +Regardless of the fill area orientation, if the interior style is +.PN PEXInteriorStylePattern , +the pattern size, pattern reference point and pattern reference vectors +are used to pattern the fill area. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXFillArea2D - 2D Fill Area Primitive +.XS + PEXFillArea2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillArea2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, unsigned int \fIcount\fP\^, PEXCoord2D *\fIpoints\fP\^) +.FN +.RE +.IN "PEXFillArea2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape of the fill area +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points defining the fill area. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D fill area output primitive. +.LP +This function is like +.PN PEXFillArea , +except that the vertices consist of only x- and y-components. The +z-component is assumed to be zero. This primitive is two-dimensional +only in that the z-components are implied. Geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXFillAreaWithData - 3D Fill Area Primitive With Additional Data +.XS + PEXFillAreaWithData +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillAreaWithData\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, unsigned int \fIfacet_attributes\fP\^, unsigned int \fIvertex_attributes\fP\^, int \fIcolor_type\fP\^, PEXFacetData *\fIfacet_data\fP\^, unsigned int \fIcount\fP\^, PEXArrayOfVertex \fIvertices\fP\^) +.FN +.RE +.IN "PEXFillAreaWithData" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape of the fill area +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIfacet_data\fP 1i +A pointer to facet data. +.IP \fIcount\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices defining the fill area. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a fill area output primitive. +.LP +This function is like +.PN PEXFillArea +except that it allows +additional information to be specified for the fill area and for each vertex. +Color values passed must be of the specified color type. +.LP +The facet attributes indicate the content of the facet data. +This data may be a color, a normal, or a color followed by a normal. +Use the constants +.PN PEXGANone , +.PN PEXGAColor +and +.PN PEXGANormal +to construct a mask indicating the data provided. +If specified, the facet color takes precedence over the +surface color. +If specified, the facet normal is used to +determine whether the fill area is back-facing. +.LP +The vertex attributes indicate the content of each fill area vertex. +In addition to the coordinate (x,y,z), applications may specify +a color, a normal, or a color followed by a normal for each vertex. +Use the constants +.PN PEXGANone , +.PN PEXGAColor +and +.PN PEXGANormal +to construct a mask indicating the data provided. +If specified, vertex colors will override facet color or the current +surface color. +If specified, vertex normals are taken to be normals at the vertices of +the fill area. +.LP +The reflection model and the surface interpolation will +affect how the additional data is used in rendering the surface. +.LP +Normals are assumed to be unit length vectors. The effect if the normal +is not unit length is implementation-dependent. +.LP +All other aspects of this primitive are the same as +.PN PEXFillArea . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXFillAreaSet - 3D Set of Fill Areas Primitive +.XS + PEXFillAreaSet +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillAreaSet\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, int \fIcontour_hint\fP\^, unsigned int \fIcount\fP\^, PEXListOfCoord *\fIpoint_lists\fP\^) +.FN +.RE +.IN "PEXFillAreaSet" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape which describes all of the contours +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIcontour_hint\fP 1i +A flag that indicates whether contours are disjoint or overlapping +.Pn ( PEXContourDisjoint , +.PN PEXContourNested , +.PN PEXContourIntersecting , +.PN PEXContourUnknown ). +.IP \fIcount\fP 1i +The number of fill areas in the set. +.IP \fIpoint_lists\fP 1i +A pointer to the list of point arrays defining each contour of the fill area set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a fill area set output primitive. +.LP +This function is similar to +.PN PEXFillArea , +but allows for the creation +of areas with "islands" or "holes". +.LP +If any fill area in the set has fewer than three vertices, or if there are +no contours defined, the primitive is considered degenerate. +The primitive is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.LP +A fill area set consists of an array of fill areas +that define "contours" (disjoint pieces or holes) making up +the primitive. Each fill area, or contour, is defined by +a list of vertices joined together to form a planar surface. +.LP +The contour hint provides further information about the +relationships between contours in the fill area set. +If the contour hint is +.PN PEXContourDisjoint , +all contours will be spatially disjoint. No overlapping +or intersection occurs between any contours in the fill area set. If +the contour hint is +.PN PEXContourNested , +contours will either be disjoint or +wholly contained within another contour. No contour will have edges +that intersect or are coincident with edges of any other contour. If +the contour hint is +.PN PEXContourIntersecting , +separated contours may have edges +that are coincident or overlap. If the contour hint is +.PN PEXContourUnknown +nothing is known about the interrelationships between contours. Fill +area sets with contours that have higher complexity interrelationships +than that indicated by the contour hint are rendered in an +implementation-dependent manner. +.LP +The ignore edges flag is applied to each of the fill areas in the set. +.LP +All other aspects of this primitive are the same as +.PN PEXFillArea . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXFillAreaSet2D - 2D Set of Fill Areas Primitive +.XS + PEXFillAreaSet2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillAreaSet2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, int \fIcontour_hint\fP\^, unsigned int \fIcount\fP\^, PEXListOfCoord2D *\fIpoint_lists\fP\^) +.FN +.RE +.IN "PEXFillAreaSet2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape which describes all of the contours +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIcontour_hint\fP 1i +A flag that indicates whether contours are disjoint or overlapping +.Pn ( PEXContourDisjoint , +.PN PEXContourNested , +.PN PEXContourIntersecting , +.PN PEXContourUnknown ). +.IP \fIcount\fP 1i +The number of fill areas in the set. +.IP \fIpoint_lists\fP 1i +A pointer to the list of point arrays defining each contour of the fill area set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D fill area set output primitive. +.LP +This function is like +.PN PEXFillAreaSet , +except +that the vertices consist of only x- and y-components. The +z-component is assumed to be zero. This primitive is two-dimensional +only in that the z-components are implied. Geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXFillAreaSetWithData - 3D Set of Fill Areas Primitive With Additional Data +.XS + PEXFillAreaSetWithData +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXFillAreaSetWithData\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, int \fIignore_edges\fP\^, int \fIcontour_hint\fP\^, unsigned int \fIfacet_attributes\fP\^, unsigned int \fIvertex_attributes\fP\^, int \fIcolor_type\fP\^, unsigned int \fIcount\fP\^, PEXFacetData *\fIfacet_data\fP\^, PEXListOfVertex *\fIvertex_lists\fP\^) +.FN +.RE +.IN "PEXFillAreaSetWithData" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape which describes all of the contours +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIignore_edges\fP 1i +A flag that determines if surface edges are rendered +.Pn ( True +or +.PN False ). +.IP \fIcontour_hint\fP 1i +A flag that indicates whether contours are disjoint or overlapping +.Pn ( PEXContourDisjoint , +.PN PEXContourNested , +.PN PEXContourIntersecting , +.PN PEXContourUnknown ). +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal , +.PN PEXGAEdges ). +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcount\fP 1i +The number of fill areas in the set. +.IP \fIfacet_data\fP 1i +A pointer to facet data. +.IP \fIvertex_lists\fP 1i +A pointer to the list of vertex arrays defining each contour of the fill area set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a fill area set output primitive. +.LP +This function is like +.PN PEXFillAreaSet +except that it allows +additional information to be specified for each fill area and for each vertex. +It is similar to +.PN PEXFillAreaWithData +but allows for the creation +of areas with "islands" or "holes". +Color values passed must be of the specified color type. +.LP +The facet attributes indicate the content of the facet data. +This data may be a color, a normal, or a color followed by a normal. +Use the constants +.PN PEXGANone , +.PN PEXGAColor +and +.PN PEXGANormal +to construct a mask indicating the data provided. +If specified, the +facet color takes precedence over the +surface color. +If specified, the facet normal is used to +determine whether the fill area is back-facing. +.LP +The vertex attributes indicate the content of each fill area vertex. +In addition to the coordinate (x,y,z), applications may specify +a color, a normal, an edge flag, or any combination of the three specified in +the order given. +Use the constants +.PN PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal +and +.PN PEXGAEdges +to construct a mask indicating the data provided. +If specified, vertex colors will override facet color or the current +surface color. +If specified, vertex normals are taken to be normals at the vertices of +the fill area. +.LP +The reflection model and the surface interpolation will +affect how the additional data is used in rendering the surface. +Edge controls are used to indicate those edges rendered if the surface edges +are enabled. The edge control for vertex i indicates whether or +not to render the edge between vertex i and vertex i+1. +Surface edges are always rendered with the surface edge color and are not +affected by the facet or vertex colors. +.LP +Normals are assumed to be unit length vectors. The effect if the normal +is not unit length is implementation-dependent. +.LP +All other aspects of this primitive are the same as +.PN PEXFillAreaSet . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXGDP - 3D Generalized Drawing Primitive +.XS + PEXGDP +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXGDP\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, long \fIgdp_id\fP\^, unsigned int \fIcount\fP\^, PEXCoord *\fIpoints\fP\^, unsigned long \fIlength\fP\^, char *\fIdata\fP\^) +.FN +.RE +.IN "PEXGDP" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIgdp_id\fP 1i +The identifier of the GDP. +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +The points used by the GDP. +.IP \fIlength\fP 1i +The length, in bytes, of the data. +.IP \fIdata\fP 1i +Additional data used by the GDP. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a generalized drawing primitive. +.LP +The complete interface and behavior for each GDP identifier +should be available with the individual PEX server implementations. +There are no standard PEX GDPs. +If the specified GDP identifier is not supported, +then the output command is ignored. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXGDP2D - 2D Generalized Drawing Primitive +.XS + PEXGDP2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXGDP2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, long \fIgdp_id\fP\^, unsigned int \fIcount\fP\^, PEXCoord2D *\fIpoints\fP\^, unsigned long \fIlength\fP\^, char *\fIdata\fP\^) +.FN +.RE +.IN "PEXGDP2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIgdp_id\fP 1i +The identifier of the GDP. +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +The points used by the GDP. +.IP \fIlength\fP 1i +The length, in bytes, of the data. +.IP \fIdata\fP 1i +Additional data used by the GDP. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D generalized drawing primitive. +.LP +The complete interface and behavior for each GDP identifier +should be available with the individual PEX server implementations. +There are no standard PEX GDPs. +If the specified GDP identifier is not supported, +then the output command is ignored. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXMarkers - 3D Markers Primitive +.XS + PEXMarkers +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXMarkers\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIcount\fP\^, PEXCoord *\fIpoints\fP\^) +.FN +.RE +.IN "PEXMarkers" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points specifying marker locations. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a markers output primitive. +.LP +A marker is a geometric primitive with a position as its only geometric +attribute. +The position is specified in modeling coordinates. +.LP +Rendering transforms the marker's position to a position in device coordinates. +A marker has no geometric size, so geometric transformations +do not affect the displayed size of the marker. +The marker's color is affected only by depth-cueing +and mapped to a device color. +The clipping of markers whose position is inside the clipping volume but whose +rendering is outside the clipping volume is implementation-dependent. +.LP +Depending on the setting of the marker ASF attributes, +the marker color, marker type, and marker scale attributes are obtained +either directly from the current marker attributes or from the marker bundle. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetMarkerType , +.PN PEXSetMarkerScale , +.PN PEXSetMarkerColorIndex , +.br +.PN PEXSetMarkerColor , +.PN PEXSetMarkerBundleIndex +.RE +.bp +.SH +PEXMarkers2D - 2D Markers Primitive +.XS + PEXMarkers2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXMarkers2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIcount\fP\^, PEXCoord2D *\fIpoints\fP\^) +.FN +.RE +.IN "PEXMarkers2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points specifying marker locations. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D markers output primitive. +.LP +This function is like +.PN PEXMarkers , +except that the vertices consist of only x- and y-components. The +z-component is assumed to be zero. This primitive is two-dimensional +only in that the z-components are implied. Geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetMarkerType , +.PN PEXSetMarkerScale , +.PN PEXSetMarkerColorIndex , +.br +.PN PEXSetMarkerColor , +.PN PEXSetMarkerBundleIndex +.RE +.bp +.SH +PEXNURBCurve - Non-Uniform Rational B-spline Curve Primitive +.XS + PEXNURBCurve +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXNURBCurve\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIrationality\fP\^, int \fIorder\fP\^, float *\fIknots\fP\^, unsigned int \fIcount\fP\^, PEXArrayOfCoord \fIpoints\fP\^, double \fItmin\fP\^, double \fItmax\fP\^) +.FN +.RE +.IN "PEXNURBCurve" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIrationality\fP 1i +The type of B-spline curve, whether rational or non-rational +.Pn ( PEXRational +or +.PN PEXNonRational ). +.IP \fIorder\fP 1i +The order of the polynomial expression. +.IP \fIknots\fP 1i +An array of floats specifying the B-spline curve knots. +.IP \fIcount\fP 1i +The number of control points that define the curve. +.IP \fIpoints\fP 1i +An array of control points defining the B-spline curve. +.IP \fItmin\fP 1i +The minimum parameter value at which to evaluate the curve. +.IP \fItmax\fP 1i +The maximum parameter value at which to evaluate the curve. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.LP +This function creates a non-uniform B-spline curve output primitive. +.LP +The curve order is specified as a positive number. +.PN PEXGetImpDepConstants +can be called to determine the largest supported value for curve order. +The spline shape is specified using +a list of knots in the parametric +coordinate space and a list of control points +in modeling coordinates. +The number of control points must be at least as large as the +order. +The number of knots is the sum of the curve order plus the number of control +points. +The sequence of knots must be non-decreasing, i.e. +t(0) <= t(1) <= ... <= t(k-1) where k is the number of knots. +.LP +If the rationality is +.PN PEXRational , +the control points must be specified in homogeneous (4D) modeling coordinates. +PEXlib assumes that 4D modeling coordinates (x,y,z) have already been +multiplied by the homogeneous coordinate (w). +If the rationality is +.PN PEXNonRational , +the control points must be +specified in non-homogeneous (3D) modeling coordinates. +.LP +Evaluation of the spline is restricted to a specific region in the +parametric coordinate space. The +parametric limits, tmin and tmax, specify the region in the +parametric coordinate space over which the spline is to +be evaluated (tmin must be less than tmax). +The parametric bounds must also satisfy the +restriction tmin >= t(order), tmax <= t(k+1-order). +.LP +Depending on the ASF attributes, line color, +line type, line width and curve approximation attributes are +obtained either directly from the current line attributes or from +the line bundle. +.LP +If the specified curve order is not supported, the output primitive +is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.LP +Also, the curve order must not be less than one. +.RE +.SH +Data Structures +.ID +.Co +typedef union { + PEXCoord2D *point_2d; + PEXCoord *point; + PEXCoord4D *point_4d; +} PEXArrayOfCoord; /* Pointer to array of points */ +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLineType , +.PN PEXSetLineWidth , +.PN PEXSetLineColorIndex , +.PN PEXSetLineColor , +.br +.PN PEXSetLineBundleIndex , +.PN PEXSetCurveApprox , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXNURBSurface - Non-Uniform Rational B-spline Surface Primitive +.XS + PEXNURBSurface +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXNURBSurface\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIrationality\fP\^, int \fIuorder\fP\^, int \fIvorder\fP\^, float *\fIuknots\fP\^, float *\fIvknots\fP\^, unsigned int \fIcol_count\fP\^, unsigned int \fIrow_count\fP\^, PEXArrayOfCoord \fIpoints\fP\^, unsigned int \fIcurve_count\fP\^, PEXListOfTrimCurve *\fItrim_curves\fP\^) +.FN +.RE +.IN "PEXNURBSurface" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIrationality\fP 1i +The type of B-spline surface, whether rational or non-rational +.Pn ( PEXRational +or +.PN PEXNonRational ). +.IP \fIuorder\fP 1i +The order of the polynomial expression in the u direction. +.IP \fIvorder\fP 1i +The order of the polynomial expression in the v direction. +.IP \fIuknots\fP 1i +An array of floats specifying the B-spline curve knots in the u direction. +.IP \fIvknots\fP 1i +An array of floats specifying the B-spline curve knots in the v direction. +.IP \fIcol_count\fP 1i +The number of columns in the points array (number of points in the u direction). +.IP \fIrow_count\fP 1i +The number of rows in the points array (number of points in the v direction). +.IP \fIpoints\fP 1i +An array of points defining the B-spline surface. +.IP \fIcurve_count\fP 1i +The number of trimming curves. +.IP \fItrim_curves\fP 1i +A pointer to a list of trimming curves. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a non-uniform B-spline surface output primitive. +.LP +The surface is generated as a function of the parametric +variables u and v. +The u and v order must be positive integers and +indicate the order of the surface in each of the u and v parameter dimensions. +.PN PEXGetImpDepConstants +can be called to determine +the largest supported value for surface u and v order. +The spline +shape is specified using two lists of knots in the parametric coordinate +space, plus an array of control points specified in +modeling coordinates. The u and v knot +sequences must each form a non-decreasing sequence of numbers. +The column count indicates the number of control points in the u direction and +the row count indicates the number of control points in the v direction. +The control points are stored in the array in row-major order (i.e., the column +number varies fastest as vertices are stored in the array) and the rows increase +in the direction of increasing v. +The number of knots in the u direction is the sum of the order in the u +direction and column count. +The number of knots in the v direction is the sum of the order in the v +direction and row count. +The number of control points in each direction must be at least as large as the +corresponding order. +.LP +The minimum and maximum knot values define the range over +which the B-spline surface is evaluated in the u or v parametric direction,. +.LP +If the rationality is +.PN PEXRational , +the control point list must be specified in +homogeneous (4D) modeling coordinates. If rationality is +.PN PEXNonRational , +the control point list must be specified in non-homogeneous (3D) modeling +coordinates. +.LP +In addition to the parametric bounds, a list of trimming loops may also +be specified. Trimming loops serve to further restrict the region in +parametric coordinate space over which the surface is evaluated. +Each trimming loop is defined as a list of one or more B-spline trimming curves +that are connected head-to-tail. Each trim curve is a completely specified +NURB curve, i.e. it is rational or non-rational, has its own order, etc. +The list must be explicitly closed so that the tail of the last curve +joins the head of the first. Each trimming curve is parameterized +independently. If there is floating point inaccuracy in closure or in +head-to-tail connectivity between curves, closure or connectivity will be +assumed. Trimming loops are defined in the parameter space of the surface +and may not go outside the parameter space of the surface. +.LP +When no trimming +loops are specified, the rectangular parameter limits of the surface are +renderer as the edges of the surface based on the edge flag attribute. +.LP +Trimming loops define the region of the surface that is to be rendered based +on the following two rules: (1) a point is in the portion of the surface to +be rendered if any ray projected from it to infinity has an odd number of +intersections with trimming loops, and (2) traveling in the direction of a +trimming loop, the portion of the surface to be trimmed away should be on +the right and the portion to be retained should be on the left. In other +words, a loop defined in counter-clockwise order will cause the interior of +the loop to be retained and the exterior to be trimmed away. +A clockwise loop will cause the exterior of +the loop to be retained and the interior to be trimmed away. +If loops are +nested, they must alternate in direction. In all cases, the outermost loop +must be counter-clockwise. No trimming curve may intersect +itself and no trimming loop may intersect itself or any other trimming loop. +Trimming loops that do +not obey these rules will result in implementation-dependent behavior. +.LP +Each trimming curve has a visibility flag that controls its visibility +for the purposes of surface edge display. Depending on the surface edge +attributes and the visibility flags associated with trimming curves, the +curves in trimming loops may be drawn as surface edges. +.LP +All attributes affecting the representation of fill area sets +also affect the representation of the non-unform B-spline surface +primitive. In addition, the surface approximation +is used to determine how to +approximate the B-spline surface and the parametric surface characteristics +are used to specify the appearance of the surface. +.LP +If either of the specified surface orders are not supported, the output +primitive +is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.LP +Trimming curve specification must abide by the constraints of NURB curve +(e.g. number of control points at least as large as the order, non-decreasing +knot sequence, order plus number of controls points equals the number of +knots). +Also, the trim curve order must not be less than two. +.RE +.SH +Data Structures +.ID +.Co +typedef union { + PEXCoord2D *point_2d; + PEXCoord *point; + PEXCoord4D *point_4d; +} PEXArrayOfCoord; /* Pointer to array of points */ +.sp +typedef struct { + unsigned short count; /* number of curves */ + PEXTrimCurve *curves; +} PEXListOfTrimCurve; +.sp +typedef struct { + PEXSwitch visibility; /* True or False */ + unsigned char reserved; + unsigned short order; + PEXCoordType rationality; /* PEXRational or PEXNonRational */ + PEXEnumTypeIndex approx_method; /* see PEXGetEnumTypeInfo */ + float tolerance; + float tmin, tmax; + PEXListOfFloat knots; + unsigned short count; /* number of control points */ + PEXArrayOfCoord control_points; +} PEXTrimCurve; +.sp +typedef unsigned char PEXSwitch; +typedef unsigned short PEXCoordType; +typedef short PEXEnumTypeIndex; +.sp +typedef struct { + unsigned short count; /* number of floats */ + float *floats; +} PEXListOfFloat; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetSurfaceApprox , +.br +.PN PEXSetFacetCullingMode , +.PN PEXSetFacetDistinguishFlag , +.br +.PN PEXSetPatternSize , +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.br +.PN PEXSetInteriorBundleIndex , +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.br +.PN PEXSetSurfaceEdgeWidth , +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.br +.PN PEXSetEdgeBundleIndex , +.PN PEXSetParaSurfCharacteristics , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXPolyline - 3D Polyline Primitive +.XS + PEXPolyline +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXPolyline\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIcount\fP\^, PEXCoord *\fIpoints\fP\^) +.FN +.RE +.IN "PEXPolyline" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points defining the polyline. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a polyline output primitive. +.LP +The points, specified in modeling coordinates, +are joined together by line segments. +The first point is joined to the second, the second to the third, +and so on. The last point is not joined to the first. +.LP +The polyline colors are affected only by depth-cueing +and are mapped to device colors. Polylines +are not displayed if they are outside the currently defined +clipping volume. Polylines crossing the clipping volume are +clipped and only the portions inside the clipping volume +are displayed. +.LP +Depending on the ASF attributes, the line color, line type, +line width, and polyline interpolation method attributes are +obtained either directly from +the current attributes or from the line bundle. +.LP +A polyline with fewer than two points is considered degenerate. +It is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLineType , +.PN PEXSetLineWidth , +.br +.PN PEXSetLineColorIndex , +.PN PEXSetLineColor , +.PN PEXSetLineBundleIndex +.RE +.bp +.SH +PEXPolyline2D - 2D Polyline Primitive +.XS + PEXPolyline2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXPolyline2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIcount\fP\^, PEXCoord2D *\fIpoints\fP\^) +.FN +.RE +.IN "PEXPolyline2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of points. +.IP \fIpoints\fP 1i +An array of points defining the polyline. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D polyline output primitive. +.LP +This function is like +.PN PEXPolyline , +except +that the points consist of only x- and y-components. The +z-component is assumed to be zero. This primitive is two-dimensional +only in that the z-components are implied. Geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLineType , +.PN PEXSetLineWidth , +.br +.PN PEXSetLineColorIndex , +.PN PEXSetLineColor , +.PN PEXSetLineBundleIndex +.RE +.bp +.SH +PEXPolylineSetWithData - 3D Set of Polylines Primitive +.XS + PEXPolylineSetWithData +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXPolylineSetWithData\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIvertex_attributes\fP\^, int \fIcolor_type\fP\^, unsigned int \fIcount\fP\^, PEXListOfVertex *\fIvertex_lists\fP\^) +.FN +.RE +.IN "PEXPolylineSetWithData" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone +or +.PN PEXGAColor ). +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcount\fP 1i +The number of polylines. +.IP \fIvertex_lists\fP 1i +A pointer to a list of vertex arrays defining each polyline in the set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a polyline set output primitive. +.LP +This function is similar to +.PN PEXPolyline +except that it allows +applications to specify a number of polylines as well as additional data. +These polylines may contain a color value at each vertex. +The vertex attributes indicate the content of the additional data. +Color values passed must be of the specified color type. +.LP +If colors are passed for each vertex, they are used instead of +the line color attribute. +The polyline interpolation method, which depending on the ASF attribute is +obtained directly from the current polyline interpolation attribute or from +the line bundle, controls how the polylines are shaded. +.LP +All other aspects of this primitive are the same as +.PN PEXPolyline . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLineType , +.PN PEXSetLineWidth , +.br +.PN PEXSetLineColorIndex , +.PN PEXSetLineColor , +.PN PEXSetPolylineInterpMethod , +.br +.PN PEXSetLineBundleIndex +.RE +.bp +.SH +PEXQuadrilateralMesh - 3D Quadrilateral Mesh Primitive +.XS + PEXQuadrilateralMesh +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXQuadrilateralMesh\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, unsigned int \fIfacet_attributes\fP\^, unsigned int \fIvertex_attributes\fP\^, int \fIcolor_type\fP\^, PEXArrayOfFacetData \fIfacet_data\fP\^, unsigned int \fIcol_count\fP\^, unsigned int \fIrow_count\fP\^, PEXArrayOfVertex \fIvertices\fP\^) +.FN +.RE +.IN "PEXQuadrilateralMesh" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape which describes all of the quadrilaterals +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIfacet_data\fP 1i +An array of facet data. +.IP \fIcol_count\fP 1i +The number of columns in the vertex array. +.IP \fIrow_count\fP 1i +The number of rows in the vertex array. +.IP \fIvertices\fP 1i +A two-dimensional (row-major) array of vertices defining the quadrilateral mesh. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a quadrilateral mesh output primitive. +.LP +The quadrilateral mesh surface is created from the vertices. +The vertex array is accessed in row major order (i.e. the column +number varies fastest as vertices are accessed). +The (ith, jth), (i+1th, jth), (i+1th, j+1th), and (ith, j+1th) +vertices are connected to create a single facet. Adjacent vertices +are interconnected until the entire facet network is processed. +.LP +Normals for quadrilaterals, if not provided explicitly, are computed by taking +the cross product of the diagonals. For a quadrilateral with the above +vertices, the cross product would be formed as follows: +.ID +normal(i,j) = (point(i+1, j+1) - point(i, j)) X (point(i, j+1) - point(i+1, j)) +.DE +.LP +Normals are assumed to be unit length vectors. If not unit length, the +result is implementation-dependent. +.LP +There must be an entry in the facet data array for each facet, if facet data +is indicated by the facet attributes. +.LP +All other aspects of this primitive are the same as +.PN PEXFillAreaSetWithData . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXSetOfFillAreaSets - 3D Set of Fill Area Sets Primitive +.XS + PEXSetOfFillAreaSets +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXSetOfFillAreaSets\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIshape_hint\fP\^, unsigned int \fIfacet_attributes\fP\^, unsigned int \fIvertex_attributes\fP\^, unsigned int \fIedge_attributes\fP\^, +int \fIcontour_hint\fP\^, int \fIcontours_all_one\fP\^, int \fIcolor_type\fP\^, unsigned int \fIset_count\fP\^, PEXArrayOfFacetData \fIfacet_data\fP\^, unsigned int \fIvertex_count\fP\^, PEXArrayOfVertex \fIvertices\fP\^, unsigned int \fIindex_count\fP\^, PEXSwitch *\fIedge_flags\fP\^, PEXConnectivityData *\fIconnectivity\fP\^) +.FN +.RE +.IN "PEXSetOfFillAreaSets" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIshape_hint\fP 1i +The shape which describes all of the contours +.Pn ( PEXShapeComplex , +.PN PEXShapeNonConvex , +.PN PEXShapeConvex , +.PN PEXShapeUnknown ). +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIedge_attributes\fP 1i +A mask indicating the edge attributes provided +.Pn ( PEXGANone +or +.PN PEXGAEdges ). +.IP \fIcontour_hint\fP 1i +A flag indicating whether contours are disjoint or overlapping +.Pn ( PEXContourDisjoint , +.PN PEXContourNested , +.PN PEXContourIntersecting , +.PN PEXContourUnknown ). +.IP \fIcontours_all_one\fP 1i +.PN True +if each fill area set contains only one contour; +.PN False +otherwise. +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIset_count\fP 1i +The number of fill area sets. +.IP \fIfacet_data\fP 1i +An array of facet data. +.IP \fIvertex_count\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices. +.IP \fIindex_count\fP 1i +The number of vertex connectivity indices (also number of edge flags, if edges are specified). +.IP \fIedge_flags\fP 1i +An array of edge flags. +.IP \fIconnectivity\fP 1i +A pointer to the list of contour connectivity data. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a set of fill area sets output primitive. +.LP +A fill area may cross over itself to create a complex shape. The odd-even +rule is used for determining the area that lies in the interior of the fill +area. +The shape hint is provided to enable performance improvements +for certain shapes. +Fill areas that are of higher complexity than indicated by the shape hint +are rendered +in an implementation-dependent manner. Consequently, +applications should pass +.PN PEXShapeUnknown +as the shape unless they are +certain the fill area's shape is one of the other three. +Note that a fill area set with more than one contour is always allowed to have +contours that intersect. If is quite possible that the only times rendering +optimization can occur are when the number of contours in a fill area set +is equal to one or if the "contours all one" flag is +.PN True , +and the shape hint is +.PN PEXShapeConvex . +.LP +The contour hint provides further information about the +relationships between contours in the fill area set. +If the contour hint is +.PN PEXContourDisjoint , +all contours will be spatially disjoint. No overlapping +or intersection occurs between any contours in the fill area set. If +the contour hint is +.PN PEXContourNested , +contours will either be disjoint or +wholly contained within another contour. No contour will have edges +that intersect or are coincident with edges of any other contour. If +the contour hint is +.PN PEXContourIntersecting , +separated contours may have edges +that are coincident or overlap. If the contour hint is +.PN PEXContourUnknown +nothing is known about the interrelationships between contours. Fill +area sets with contours that have higher complexity interrelationships +than that indicated by the contour hint are rendered in an +implementation-dependent manner. +.LP +The facet attributes indicate the content of the facet data. +This data may be a color, a normal, or a color followed by a normal. +Use the constants +.PN PEXGANone , +.PN PEXGAColor +and +.PN PEXGANormal +to construct a mask indicating the data provided. +If specified, the +facet color takes precedence over the +surface color. +If specified, the facet normal is used to +determine whether the fill area is back-facing. +.LP +The vertex attributes indicate the content of each fill area vertex. +In addition to the coordinate (x,y,z), applications may specify +a color, a normal, or a color followed by a normal for each vertex. +Use the constants +.PN PEXGANone , +.PN PEXGAColor +and +.PN PEXGANormal +to construct a mask indicating the data provided. +If specified, vertex colors will override facet color or the current +surface color. +If specified, vertex normals are taken to be normals at the vertices of +the fill area. +.LP +The reflection model and the surface interpolation will +affect how the additional data is used in rendering the surface. +.LP +Color values passed must be of the specified color type. +Normals are assumed to be unit length vectors. The effect if the normal +is not unit length is implementation-dependent. +.LP +The edge attributes indicate the content of the edge flags. Use +.PN PEXGAEdges +to indicate edge flags are provided or +.PN PEXGANone +if no edge flags are provided. +The edge flags, if present, are set to +.PN PEXOn +or +.PN PEXOff +and are +used to indicate which edges should be rendered. +The edge control for vertex i indicates whether or +not to render the edge between vertex i and vertex i+1. +Surface edges are always rendered with the surface edge color and are not +affected by the facet or vertex colors. +.LP +The connectivity of the primitive is defined by the connectivity list. +The connectivity list is a pointer to an array of +.PN PEXConnectivityData +structures. Each entry in the array gives the contours for one fill area set +in the set of fill area sets, and, in turn, contains a pointer to an array of +.PN PEXListOfUShort +structures. Each of these latter structures gives the index of the vertices +of one contour in that fill area set. The indices select a vertex in the array +of vertices. +Vertices are numbered with indices starting from zero (i.e. the first +vertex is referenced as vertex 0). +As a special case, if the "contours all one" flag is +.PN True +then the contour count +field in each fill area set is guaranteed to be one. +.LP +All attributes affecting the representation of fill area sets also +affect the representation of this primitive. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short count; /* number of lists */ + PEXListOfUShort *lists; +} PEXConnectivityData; +.sp +typedef struct { + unsigned short count; /* number of shorts */ + unsigned short *shorts; +} PEXListOfUShort; +.sp +typedef unsigned char PEXSwitch; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp +.SH +PEXText - 3D Text Primitive +.XS + PEXText +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXText\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIorigin\fP\^, PEXVector *\fIvector1\fP\^, PEXVector *\fIvector2\fP\^, int \fIlength\fP\^, char *\fIstring\fP\^) +.FN +.RE +.IN "PEXText" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIvector1\fP 1i +A vector defining the positive x-direction of the text local coordinate system. +.IP \fIvector2\fP 1i +A vector defining the positive y-direction of the text local coordinate system. +.IP \fIlength\fP 1i +The number of bytes in the text string. +.IP \fIstring\fP 1i +A pointer to the text string. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a text output primitive. +.LP +The first character set in the text font will be used. +.LP +The text string is located on a plane defined by +its position and direction vectors. The origin defines the position, in +model coordinates, +at which to render the text string. The two direction vectors define the +positive x- and y-directions of the text local coordinate system. +If the two vectors are parallel or if one of the vectors has zero +length, the vector values <1,0,0> and <0,1,0> are used. +.LP +During rendering, the string's position is +transformed to a position in device coordinates. The string's +color is only affected by depth-cueing +and is mapped to a device color. The text string is clipped depending +on the current text precision attribute. If the text precision is +.PN PEXStringPrecision , +clipping is done in an implementation-dependent fashion. +If the text precision is +.PN PEXCharPrecision , +clipping is done on at least a character-by-character basis. +If the text precision is +.PN PEXStrokePrecision , +clipping is performed at the clipping boundaries for each character. +.LP +Depending on the text ASF values, the text color, text precision, +character expansion, character spacing, and text font attributes are +obtained either directly from the current text attribute values or +from the entry in the text bundle +specified by the current text bundle index attribute. +The current character height, text path, text alignment attributes +and character up vector are also used to render the text string. +The directions specified by the character up vector and text path +are relative to the text local coordinate system. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.br +.PN PEXSetCharExpansion , +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.br +.PN PEXSetTextColor , +.PN PEXSetCharHeight , +.PN PEXSetCharUpVector , +.br +.PN PEXSetTextPath , +.PN PEXSetTextAlignment , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXText2D - 2D Text Primitive +.XS + PEXText2D +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXText2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIorigin\fP\^, int \fIlength\fP\^, char *\fIstring\fP\^) +.FN +.RE +.IN "PEXText2D" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIorigin\fP 1i +The origin of the text string. +.IP \fIlength\fP 1i +The number of bytes in the text string. +.IP \fIstring\fP 1i +A pointer to the text string. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a 2D text output primitive. +.LP +This function is like +.PN PEXText , +except that the origin position consists of only x- and y-components. The +z-component is assumed to be zero. This primitive is two-dimensional +only in that the z-component is implied. Geometry +transformations are still carried out in three dimensions. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetTextFontIndex , +.PN PEXSetTextPrecision , +.br +.PN PEXSetCharExpansion , +.PN PEXSetCharSpacing , +.PN PEXSetTextColorIndex , +.br +.PN PEXSetTextColor , +.PN PEXSetCharHeight , +.PN PEXSetCharUpVector , +.br +.PN PEXSetTextPath , +.PN PEXSetTextAlignment , +.PN PEXSetTextBundleIndex +.RE +.bp +.SH +PEXTriangleStrip - 3D Triangle Strip Primitive +.XS + PEXTriangleStrip +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXTriangleStrip\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIfacet_attributes\fP\^, unsigned int \fIvertex_attributes\fP\^, int \fIcolor_type\fP\^, PEXArrayOfFacetData \fIfacet_data\fP\^, unsigned int \fIcount\fP\^, PEXArrayOfVertex \fIvertices\fP\^) +.FN +.RE +.IN "PEXTriangleStrip" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided +.Pn ( PEXGANone , +.PN PEXGAColor , +.PN PEXGANormal ). +.IP \fIcolor_type\fP 1i +The type of color data provided +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIfacet_data\fP 1i +An array of facet data. +.IP \fIcount\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices defining the triangle strip. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a triangle strip output primitive. +.LP +The triangle strip is created from the array of vertices. There are +two less facets in the strip than the number of vertices. +The first triangle in the strip +is formed from the first three vertices in the list, the second +triangle is formed by the second through the fourth vertices in +the list, etc., up to the last triangle, which is formed by the +last three vertices in the list. +There must be an entry in the facet data array for each facet, if facet data +is indicated by the facet attributes. +.LP +Normals are assumed to be unit length vectors. If not unit length, the +result is implementation-dependent. +.LP +A triangle strip with fewer than +three vertices is considered degenerate. +It is stored in a structure, but when rendered, the primitive +is ignored and has no visual effect. +.LP +All other aspects of this primitive are the same as +.PN PEXFillAreaWithData . +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetInteriorStyle , +.PN PEXSetInteriorStyleIndex , +.PN PEXSetSurfaceColorIndex , +.br +.PN PEXSetSurfaceColor , +.PN PEXSetReflectionAttributes , +.PN PEXSetReflectionModel , +.br +.PN PEXSetSurfaceInterpMethod , +.PN PEXSetBFInteriorStyle , +.PN PEXSetBFInteriorStyleIndex , +.br +.PN PEXSetBFSurfaceColorIndex , +.PN PEXSetBFSurfaceColor , +.PN PEXSetBFReflectionAttributes , +.br +.PN PEXSetBFReflectionModel , +.PN PEXSetBFSurfaceInterpMethod , +.PN PEXSetFacetCullingMode , +.br +.PN PEXSetFacetDistinguishFlag , +.PN PEXSetPatternSize , +.br +.PN PEXSetPatternAttributes , +.PN PEXSetPatternAttributes2D , +.PN PEXSetInteriorBundleIndex , +.br +.PN PEXSetSurfaceEdgeFlag , +.PN PEXSetSurfaceEdgeType , +.PN PEXSetSurfaceEdgeWidth , +.br +.PN PEXSetSurfaceEdgeColor , +.PN PEXSetSurfaceEdgeColorIndex , +.PN PEXSetEdgeBundleIndex +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter02.3 b/xc/doc/specs/PEX5/PEXlib/chapter02.3 new file mode 100644 index 000000000..cac720da1 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter02.3 @@ -0,0 +1,5538 @@ +.NH 2 +Output Primitive Attribute Functions +.XS +\*(SN Output Primitive Attribute Functions +.XE +.IN "output commands" +.IN "attributes" +.LP +This section describes all the output primitive attribute functions. +More detailed information on attributes is given in +\fIChapter 4: Pipeline Contexts\fP. +Attributes that have optional enumerated types have their valid +values listed under +.PN PEXGetEnumTypeInfo +in \fIChapter 1: Introduction to PEXlib\fP. +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the +data structures used that are common to more than one function described in this +section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.sp +typedef struct { + float x; + float y; +} PEXVector2D; +.DE +/* colors */ +.ID +typedef union { + PEXColorIndexed indexed; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; +} PEXColor; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.sp +typedef struct { + PEXColorType type; /* PEXColorTypeIndexed, PEXColorTypeRGB, */ + /* PEXColorTypeCIE, PEXColorTypeHSV, */ + /* PEXColorTypeHLS, PEXColorTypeRGB8, */ + /* PEXColorTypeRGB16 */ + unsigned short reserved; + PEXColor value; +} PEXColorSpecifier; +.DE +/* matrices */ +.ID +typedef float PEXMatrix[4][4]; +typedef float PEXMatrix3x3[3][3]; +.DE +/* similar to XErrorEvent - use to access additional info in OC error */ +.ID +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XID resourceid; /* resource id of renderer or structure */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error code of failed request */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ + unsigned short op_code; /* op-code of failed output command */ + unsigned short count; /* number of output commands successfully */ + /* executed before error */ +} PEXOCErrorEvent; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXAddToNameSet - Add Names to Name Set +.XS + PEXAddToNameSet +.XE +.IN "PEXAddToNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXAddToNameSet\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned long \fIcount\fP\^, PEXName *\fInames\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of names. +.IP \fInames\fP 1i +An array of names to be added to the current name set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +adds the specified list of names to the current name set. +If any name is outside the supported range that name is ignored. +.IN "filters" +.IN "invisibility filter" +.IN "highlight filter" +.IN "pick filter" +.RE +.SH +Data Structures +.ID +.Co +typedef unsigned long PEXName; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet , +.PN PEXRemoveFromNameSet , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXRemoveFromNameSet - Remove Names from Name Set +.XS + PEXRemoveFromNameSet +.XE +.IN "PEXRemoveFromNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRemoveFromNameSet\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned long \fIcount\fP\^, PEXName *\fInames\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcount\fP 1i +The number of names. +.IP \fInames\fP 1i +An array of names to be removed from the current name set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +removes the specified list of names from the current name set. +If any name is outside the supported range that name is ignored. +.IN "filters" +.IN "invisibility filter" +.IN "highlight filter" +.IN "pick filter" +.RE +.SH +Data Structures +.ID +.Co +typedef unsigned long PEXName; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet , +.PN PEXAddToNameSet , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXRestoreModelClipVolume - Restore Model Clip Volume +.XS + PEXRestoreModelClipVolume +.XE +.IN "PEXRestoreModelClipVolume" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRestoreModelClipVolume\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +restores the last-saved modeling clipping volume. +If there is no last-saved clipping volume +that can be restored, the modeling clipping volume is restored +to its default state. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetModelClipFlag , +.PN PEXSetModelClipVolume , +.br +.PN PEXSetModelClipVolume +.RE +.bp +.SH +PEXSetATextAlignment - Set Annotation Text Alignment +.XS + PEXSetATextAlignment +.XE +.IN "PEXSetATextAlignment" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetATextAlignment\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIhalignment\fP\^, int \fIvalignment\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIhalignment\fP 1i +The horizontal annotation text alignment +.Pn ( PEXHAlignNormal , +.PN PEXHAlignLeft , +.PN PEXHAlignCenter , +.PN PEXHAlignRight ). +.IP \fIvalignment\fP 1i +The vertical annotation text alignment +.Pn ( PEXVAlignNormal , +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase , +.PN PEXVAlignBottom ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the horizontal and vertical annotation text alignment attributes. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetATextHeight - Set Annotation Text Height +.XS + PEXSetATextHeight +.XE +.IN "PEXSetATextHeight" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetATextHeight\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIheight\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIheight\fP 1i +The annotation text character height. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the annotation text height attribute. +If the specified height or the +computed width is not supported, the height or width is mapped to the nearest +supported annotation character height or width. +These values depend on the +font files that are in the font groups in the selected font table entry, which +in turn depend on which X or PEX font files have been opened. +If all scalable and rotatable stroke fonts are open, then a continuous range of +character sizes are supported. +The height is expressed in normalized projection coordinates. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetATextPath - Set Annotation Text Path +.XS + PEXSetATextPath +.XE +.IN "PEXSetATextPath" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetATextPath\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIpath\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpath\fP 1i +The text (drawing) path +.Pn ( PEXPathRight , +.PN PEXPathLeft , +.PN PEXPathUp , +.PN PEXPathDown ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the annotation text path attribute. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetATextStyle - Set Annotation Text Style +.XS + PEXSetATextStyle +.XE +.IN "PEXSetATextStyle" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetATextStyle\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIstyle\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIstyle\fP 1i +The annotation text style +.Pn ( PEXATextNotConnected +or +.PN PEXATextConnected ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the annotation text style attribute. +If the specified style is not supported, +.PN PEXATextNotConnected +is used. +Supported values for annotation text style are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetATextUpVector - Set Annotation Text Up Vector +.XS + PEXSetATextUpVector +.XE +.IN "PEXSetATextUpVector" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetATextUpVector\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXVector2D *\fIvector\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIvector\fP 1i +The annotation text character up vector. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the annotation text up vector attribute. +The vector is specified in the text local coordinate system defined by the +direction vectors associated with the annotation text primitive. +Only the direction of the vector is used, not the magnitude. +However, if the annotation text up vector is degenerate (it has a length of +zero), a value <0,1> is used. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetBFInteriorStyle - Set Back-Face Surface Interior Style +.XS + PEXSetBFInteriorStyle +.XE +.IN "PEXSetBFInteriorStyle" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFInteriorStyle\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIstyle\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIstyle\fP 1i +The back-facing surface interior style +.Pn ( PEXInteriorStyleHollow , +.PN PEXInteriorStyleSolid , +.PN PEXInteriorStylePattern , +.PN PEXInteriorStyleHatch , +.PN PEXInteriorStyleEmpty ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface interior style attribute. +If the specified style is not supported, +.PN PEXInteriorStyleHollow +is used. +Supported values for back-facing surface interior style are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetBFInteriorStyleIndex - Set Back-Face Surface Interior Style Index +.XS + PEXSetBFInteriorStyleIndex +.XE +.IN "PEXSetBFInteriorStyleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFInteriorStyleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The back-facing surface interior style index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing interior style index attribute. +If the current back-facing interior style is +.PN PEXInteriorStylePattern +or +.PN PEXInteriorStyleHatch , +the specified index is used to further define the rendering style of back-facing +surface primitives. For +.PN PEXInteriorStylePattern , +if the specified pattern table index is not defined, table index one is used. +For +.PN PEXInteriorStyleHatch , +the index determines the hatch style. If the specified hatch style is not +supported, style one is used. If style one is not supported, the result is +implementation-dependent. +Supported values for hatch style are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetBFReflectionAttributes - Set Back-Face Surface Reflection Attributes +.XS + PEXSetBFReflectionAttributes +.XE +.IN "PEXSetBFReflectionAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFReflectionAttributes\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXReflectionAttributes *\fIattributes\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIattributes\fP 1i +The back-facing surface reflection attributes. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface reflection attributes. +Surface reflection attributes consist of +the ambient, diffuse and specular coefficients, +the specular concentration and color, +and the transmission coefficient. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + float ambient; + float diffuse; + float specular; + float specular_conc; + float transmission; + PEXColorSpecifier specular_color; +} PEXReflectionAttributes; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetBFReflectionModel - Set Back-Face Surface Reflection Model +.XS + PEXSetBFReflectionModel +.XE +.IN "PEXSetBFReflectionModel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFReflectionModel\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImodel\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImodel\fP 1i +The back-facing surface reflection model +.Pn ( PEXReflectionNone , +.PN PEXReflectionAmbient , +.PN PEXReflectionDiffuse , +.PN PEXReflectionSpecular ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface reflection model attribute. +If the specified reflection model is not supported, +.PN PEXReflectionNone +is used. +Supported values for back-facing surface reflection model are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetBFSurfaceColor - Set Back-Face Surface Color +.XS + PEXSetBFSurfaceColor +.XE +.IN "PEXSetBFSurfaceColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFSurfaceColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the back-facing surface color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetBFSurfaceColorIndex - Set Back-Face Surface Color Index +.XS + PEXSetBFSurfaceColorIndex +.XE +.IN "PEXSetBFSurfaceColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFSurfaceColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index for back-facing surfaces. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface color attribute +to an indexed color with the value indicated by index. +If the color index is not defined, color index one is used. If color index +one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetBFSurfaceInterpMethod - Set Back-Face Surface Interpolation Method +.XS + PEXSetBFSurfaceInterpMethod +.XE +.IN "PEXSetBFSurfaceInterpMethod" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetBFSurfaceInterpMethod\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImethod\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImethod\fP 1i +The back-facing surface interpolation method +.Pn ( PEXSurfaceInterpNone , +.PN PEXSurfaceInterpColor , +.PN PEXSurfaceInterpDotProduct , +.PN PEXSurfaceInterpNormal ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the back-facing surface interpolation method attribute. +If the specified interpolation method is not supported, +.PN PEXSurfaceInterpNone +is used. +Supported values for back-facing surface interpolation method are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetCharExpansion - Set Character Expansion Factor +.XS + PEXSetCharExpansion +.XE +.IN "PEXSetCharExpansion" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetCharExpansion\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIexpansion\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIexpansion\fP 1i +The character expansion factor. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the character expansion factor attribute. +Only the magnitude of the specified expansion is considered. +The specified character expansion factor is compared to the minimum and +maximum character +expansion factors. These values depend on the font files that are in the +font groups in the selected font table entry, which in turn depend on the font +files opened. +For example, if all scalable and rotatable stroke fonts are open, then a +continuous number of expansions are supported. +If the expansion is smaller than the minimum character expansion factor, the +minimum value is used. +If the expansion is larger than the maximum character expansion factor, the +maximum value is used. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetCharHeight - Set Character Height +.XS + PEXSetCharHeight +.XE +.IN "PEXSetCharHeight" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetCharHeight\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIheight\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIheight\fP 1i +The text character height. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the character height value attribute. +If the specified height or the computed width is not supported, the height +or width is mapped to the nearest supported character height or width. +These values depend on the font files that are in the font groups in the +selected font table entry, which in turn depend on which X or PEX fonts are +open. For example, if the client opens all scalable and rotatable stroke +fonts, a continuous number of character sizes are supported. +The height is specified in the text local coordinate system. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetCharSpacing - Set Character Spacing +.XS + PEXSetCharSpacing +.XE +.IN "PEXSetCharSpacing" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetCharSpacing\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIspacing\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIspacing\fP 1i +The text character spacing factor. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the character spacing attribute. +The character spacing attribute is expressed as a fraction of the +font's nominal character height. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetCharUpVector - Set Character Up Vector +.XS + PEXSetCharUpVector +.XE +.IN "PEXSetCharUpVector" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetCharUpVector\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXVector2D *\fIvector\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIvector\fP 1i +The text character up vector. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text up vector attribute. +The vector is specified in the text local coordinate system defined by the +direction vectors associated with the annotation text primitive. +If the annotation text up vector is degenerate (it has a length of zero), +a value <0,1> is used. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetColorApproxIndex - Set Color Approximation Index +.XS + PEXSetColorApproxIndex +.XE +.IN "PEXSetColorApproxIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetColorApproxIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color approximation table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the color approximation index attribute. +If the specified index is not defined, index zero is used. If index zero is +not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color approximation index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetCurveApprox - Set Curve Approximation Method +.XS + PEXSetCurveApprox +.XE +.IN "PEXSetCurveApprox" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetCurveApprox\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImethod\fP\^, double \fItolerance\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImethod\fP 1i +The curve approximation method +.Pn ( PEXApproxImpDep , +.PN PEXApproxConstantBetweenKnots , +.PN PEXApproxWCChordalSize , +.PN PEXApproxNPCChordalSize , +.PN PEXApproxDCChordalSize , +.PN PEXCurveApproxWCChordalDev , +.PN PEXCurveApproxNPCChordalDev , +.PN PEXCurveApproxDCChordalDev , +.PN PEXApproxWCRelative , +.PN PEXApproxNPCRelative , +.PN PEXApproxDCRelative ). +.IP \fItolerance\fP 1i +The curve approximation tolerance (specific to each method). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the curve approximation attribute. +If the specified method is not supported, an implementation-dependent method +(method 1) is used. +Supported values for curve approximation are inquirable via +.PN PEXGetEnumTypeInfo . +The tolerance value is +provided to indicate the desired accuracy of the approximation, and is +used in different ways for the different methods. See +\fIChapter 4: Pipeline Contexts\fP +for more information about tolerance values. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetDepthCueIndex - Set Depth Cue Index +.XS + PEXSetDepthCueIndex +.XE +.IN "PEXSetDepthCueIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetDepthCueIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The depth cue table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the depth-cue index attribute. +If the specified index is not defined, index zero is used. If index zero +is not defined, depth cueing is turned off. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The depth cue index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetEdgeBundleIndex - Set Edge Bundle Index +.XS + PEXSetEdgeBundleIndex +.XE +.IN "PEXSetEdgeBundleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetEdgeBundleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The edge bundle table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the edge bundle index attribute. +If an undefined index is specified, default bundle index one is used. +If index one is not defined, the edge bundle attributes are set as +follows: surface edges are turned off, the edge type is solid, the edge +width is 1.0 and the color is indexed color one. +.LP +An edge bundle table index of 0 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetFacetCullingMode - Set Facet Culling Mode +.XS + PEXSetFacetCullingMode +.XE +.IN "PEXSetFacetCullingMode" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetFacetCullingMode\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImode\fP 1i +The facet culling mode +.Pn ( PEXNone , +.PN PEXBackFaces , +.PN PEXFrontFaces ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the facet culling mode attribute. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetFacetDistinguishFlag - Set Facet Distinguish Flag +.XS + PEXSetFacetDistinguishFlag +.XE +.IN "PEXSetFacetDistinguishFlag" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetFacetDistinguishFlag\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIflag\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIflag\fP 1i +The facet distinguish flag +.Pn ( True +or +.PN False ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the facet distinguish flag attribute. +Values for the facet distinguish flag are +.PN True +(use back-face attributes to renderer surfaces) +or +.PN False +(use front-face attributes to renderer surfaces). +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetGlobalTransform - Set Global Transformation 3D +.XS + PEXSetGlobalTransform +.XE +.IN "PEXSetGlobalTransform" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetGlobalTransform\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXMatrix \fItransform\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fItransform\fP 1i +The new global transformation matrix. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +replaces the current global transformation matrix with the specified matrix. +The matrix is stored in row-major order. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetGlobalTransform2D +.RE +.bp +.SH +PEXSetGlobalTransform2D - Set Global Transformation 2D +.XS + PEXSetGlobalTransform2D +.XE +.IN "PEXSetGlobalTransform2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetGlobalTransform2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXMatrix3x3 \fItransform\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fItransform\fP 1i +The new global transformation matrix. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +replaces the current global transformation matrix with the specified matrix. +This output command is similar to +.PN PEXSetGlobalTransform +except that the global transformation matrix is specified as a 3 \(mu 3 matrix. +Before replacement of the global transformation matrix, +the 3 \(mu 3 matrix represented by +.IP +.EQ +left [ + { + ~~~ pile { a above d above g } + ~~~ pile { b above e above h } + ~~~ pile { c above f above j } + } + ~~~ right ] +.EN +.sp +is expanded to a 4 \(mu 4 matrix as follows: +.IP +.EQ +left [ + { + ~~~ pile { a above d above g } + ~~~ pile { b above e above h } + ~~~ pile { c above f above j } + } + ~~~ right ] -> +left [ + { + ~~~ pile { a above d above 0 above g } + ~~~ pile { b above e above 0 above h } + ~~~ pile { 0 above 0 above 1 above 0 } + ~~~ pile { c above f above 0 above j } + } + ~~~ right ] +.EN +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetGlobalTransform +.RE +.bp +.SH +PEXSetHLHSRID - Set Hidden-Line Hidden-Surface Removal Identifier +.XS + PEXSetHLHSRID +.XE +.IN "PEXSetHLHSRID" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetHLHSRID\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned long \fIhlhsr_id\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIhlhsr_id\fP 1i +The HLHSR identifier +.Pn ( PEXHLHSRIDDisable +or +.PN PEXHLHSRIDEnable ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the HLHSR identifier attribute. +This output command is a no-op for all +standard HLHSR modes except +.PN PEXHLHSRZBufferID . +If the renderer's HLHSR mode is set to +.PN PEXHLHSRZBufferID , +then a HLHSR identifier of +.PN PEXHLHSRIDDisable +will disable z-buffering and a +HLHSR identifier of +.PN PEXHLHSRIDEnable +will enable z-buffering. +For non-standard HLHSR modes, +the effect of this output command is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetIndividualASF - Set Individual Aspect Source Flags +.XS + PEXSetIndividualASF +.XE +.IN "PEXSetIndividualASF" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetIndividualASF\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned long \fIattribute\fP\^, int \fIasf\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIattribute\fP 1i +The ASF attribute name (see the Description). +.IP \fIasf\fP 1i +The attribute source flag value +.Pn ( PEXIndividual +or +.PN PEXBundled ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the aspect source flag for a single, individual attribute. +For the individual ASF attribute name, valid values are: +.ID +.PN PEXASFBFInteriorStyle +.PN PEXASFBFInteriorStyleIndex +.PN PEXASFBFReflectionAttr +.PN PEXASFBFReflectionModel +.PN PEXASFBFSurfaceColor +.PN PEXASFBFSurfaceInterp +.PN PEXASFCharExpansion +.PN PEXASFCharSpacing +.PN PEXASFCurveApprox +.PN PEXASFInteriorStyle +.PN PEXASFInteriorStyleIndex +.PN PEXASFLineColor +.PN PEXASFLineType +.PN PEXASFLineWidth +.PN PEXASFMarkerColor +.PN PEXASFMarkerScale +.PN PEXASFMarkerType +.PN PEXASFPolylineInterp +.PN PEXASFReflectionAttr +.PN PEXASFReflectionModel +.PN PEXASFSurfaceApprox +.PN PEXASFSurfaceColor +.PN PEXASFSurfaceEdgeColor +.PN PEXASFSurfaceEdgeType +.PN PEXASFSurfaceEdgeWidth +.PN PEXASFSurfaceEdges +.PN PEXASFSurfaceInterp +.PN PEXASFTextColor +.PN PEXASFTextFontIndex +.PN PEXASFTextPrec +.DE +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetInteriorBundleIndex - Set Interior Bundle Index +.XS + PEXSetInteriorBundleIndex +.XE +.IN "PEXSetInteriorBundleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetInteriorBundleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The interior bundle table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the interior bundle index attribute. +If the specified index is not defined, the default index one is used. If +index one is not defined, the following bundle values are used: interior style is +.PN PEXInteriorStyleHollow ; +interior style index is one; surface color is indexed color one; reflection +attributes are ambient, diffuse and specular coefficient of 1.0, specular +concentration and transmission coefficient of 0.0 and specular color of indexed +color one; reflection model is +.PN PEXReflectionNone ; +surface interpolation is +.PN PEXSurfaceInterpNone ; +and surface approximation is method 1 +.Pn ( PEXApproxImpDep ) +with u and v tolerances of 1.0. +The back-facing attributes are set to identical values as the front-facing +attributes. +.LP +An interior bundle table index of 0 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetInteriorStyle - Set Surface Interior Style +.XS + PEXSetInteriorStyle +.XE +.IN "PEXSetInteriorStyle" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetInteriorStyle\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIstyle\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIstyle\fP 1i +The interior style +.Pn ( PEXInteriorStyleHollow , +.PN PEXInteriorStyleSolid , +.PN PEXInteriorStylePattern , +.PN PEXInteriorStyleHatch , +.PN PEXInteriorStyleEmpty ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface interior style attribute. +If the specified style is not supported, +.PN PEXInteriorStyleHollow +is used. +Supported values for surface interior style are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetInteriorStyleIndex - Set Surface Interior Style Index +.XS + PEXSetInteriorStyleIndex +.XE +.IN "PEXSetInteriorStyleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetInteriorStyleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The interior style index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the interior style index attribute. +If the current interior style is +.PN PEXInteriorStylePattern +or +.PN PEXInteriorStyleHatch , +the specified index is used to further define the rendering style of +front-facing surface primitives. For +.PN PEXInteriorStylePattern , +if the specified pattern table index is not defined, table index one is used. +For +.PN PEXInteriorStyleHatch , +the index determines the hatch style. If the specified hatch style is not +supported, style one is used. If style one is not supported, the result is +implementation-dependent. +Supported values for hatch style are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetLightSourceState - Set Light Source State +.XS + PEXSetLightSourceState +.XE +.IN "PEXSetLightSourceState" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLightSourceState\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIenable_count\fP\^, PEXTableIndex *\fIenable\fP\^, unsigned int \fIdisable_count\fP\^, PEXTableIndex *\fIdisable\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIenable_count\fP 1i +The number of lights to enable. +.IP \fIenable\fP 1i +An array of lights to enable. +.IP \fIdisable_count\fP 1i +The number of lights to disable. +.IP \fIdisable\fP 1i +An array of lights to disable. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the light source state attribute. +Each element in the enable list activates the light represented by +the corresponding light table entry and each element in the disable +list deactivates the light represented by the corresponding light +table entry. +.LP +A light listed in both the enable list and the disable list, or a +light index of 0 will produce a +.PN BadPEXOutputCommand +error. +Otherwise, if any light in the enable or disable list references an undefined +light table entry, the light is ignored. +.RE +.SH +Data Structures +.ID +.Co +typedef unsigned short PEXTableIndex; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetLineBundleIndex - Set Line Bundle Index +.XS + PEXSetLineBundleIndex +.XE +.IN "PEXSetLineBundleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLineBundleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The line bundle table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the line bundle index attribute. +If an undefined line bundle index is specified, the default bundle index one +is used. If index one is not defined, the following values are used: line type is +.PN PEXLineTypeSolid ; +polyline interpolation is +.PN PEXPolylineInterpNone ; +curve approximation is method 1 +.Pn ( PEXApproxImpDep ) +with a tolerance of 1.0; line width is 1.0 and line color is index color one. +.LP +A line bundle table index of 0 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetLineColor - Set Line Color +.XS + PEXSetLineColor +.XE +.IN "PEXSetLineColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLineColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the line color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the line color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetLineColorIndex - Set Line Color Index +.XS + PEXSetLineColorIndex +.XE +.IN "PEXSetLineColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLineColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index for lines. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the line color attribute +to an indexed color with the value indicated by index. +If the color index is not defined, color index one is used. If color index +one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetLineType - Set Line Type +.XS + PEXSetLineType +.XE +.IN "PEXSetLineType" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLineType\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIline_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIline_type\fP 1i +The line type +.Pn ( PEXLineTypeSolid , +.PN PEXLineTypeDashed , +.PN PEXLineTypeDotted , +.PN PEXLineTypeDashDot ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the line type attribute. +If the specified line type is not supported, +.PN PEXLineTypeSolid +is used. +Supported values for line type are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetLineWidth - Set Line Width +.XS + PEXSetLineWidth +.XE +.IN "PEXSetLineWidth" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLineWidth\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIwidth\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIwidth\fP 1i +The line width scale factor. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the line width attribute. +The specified width is used as a scale factor. +This scale factor is used to increase or decrease the width (in pixels) +from the nominal line width for the display device. The result is +mapped to the nearest supported line width. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetImpDepConstants , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetLocalTransform - Set Local Transformation 3D +.XS + PEXSetLocalTransform +.XE +.IN "PEXSetLocalTransform" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLocalTransform\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcomposition\fP\^, PEXMatrix \fItransform\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcomposition\fP 1i +The composition rule for combining the new matrix with the current local transform +.Pn ( PEXPreConcatenate , +.PN PEXPostConcatenate , +.PN PEXReplace ). +.IP \fItransform\fP 1i +The new local transformation matrix. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +modifies the local transformation matrix. +If the composition type is +.PN PEXPreConcatenate , +the specified matrix is +pre-concatenated to the current local transformation matrix +( L' = L \(mu T ). +If the composition type is +.PN PEXPostConcatenate , +the specified +matrix is post-concatenated to the current local +transformation matrix ( L' = T \(mu L ). If the composition type is +.PN PEXReplace , +the specified matrix replaces the current local +transformation matrix ( L' = T ). +.LP +The composite matrix is then recomputed using the current global transformation +and the new local transformation matrix ( C = G \(mu L' ). +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLocalTransform2D +.RE +.bp +.SH +PEXSetLocalTransform2D - Set Local Transformation 2D +.XS + PEXSetLocalTransform2D +.XE +.IN "PEXSetLocalTransform2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetLocalTransform2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcomposition\fP\^, PEXMatrix3x3 \fItransform\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcomposition\fP 1i +The composition rule for combining the new matrix with the current local transform +.Pn ( PEXPreConcatenate , +.PN PEXPostConcatenate , +.PN PEXReplace ). +.IP \fItransform\fP 1i +The new local transformation matrix. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +modifies the local transformation matrix. +This output command is similar to +.PN PEXSetLocalTransform +except +that the local transformation matrix is specified as a 3 \(mu 3 matrix. +Before modification of the local transformation matrix, +the 3 \(mu 3 matrix represented by +.IP +.EQ +left [ + { + ~~~ pile { a above d above g } + ~~~ pile { b above e above h } + ~~~ pile { c above f above j } + } + ~~~ right ] +.EN +.sp +is expanded to a 4 \(mu 4 matrix as follows: +.IP +.EQ +left [ + { + ~~~ pile { a above d above g } + ~~~ pile { b above e above h } + ~~~ pile { c above f above j } + } + ~~~ right ] -> +left [ + { + ~~~ pile { a above d above 0 above g } + ~~~ pile { b above e above 0 above h } + ~~~ pile { 0 above 0 above 1 above 0 } + ~~~ pile { c above f above 0 above j } + } + ~~~ right ] +.EN +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetLocalTransform +.RE +.bp +.SH +PEXSetMarkerBundleIndex - Set Marker Bundle Index +.XS + PEXSetMarkerBundleIndex +.XE +.IN "PEXSetMarkerBundleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetMarkerBundleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The marker bundle table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the marker bundle index attribute. +If an undefined index is specified, the default bundle index one is used. +If index one is undefined, the default values are used: marker type is +.PN PEXMarkerAsterisk ; +marker scale is 1.0 and marker color is indexed color one. +.LP +A marker bundle table index of 0 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetMarkerColor - Set Marker Color +.XS + PEXSetMarkerColor +.XE +.IN "PEXSetMarkerColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetMarkerColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the marker color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the marker color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetMarkerColorIndex - Set Marker Color Index +.XS + PEXSetMarkerColorIndex +.XE +.IN "PEXSetMarkerColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetMarkerColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index for markers. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the marker color attribute +to an indexed color with the value indicated by index. +If the color index is not defined, color index one is used. If color index +one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetMarkerScale - Set Marker Scale +.XS + PEXSetMarkerScale +.XE +.IN "PEXSetMarkerScale" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetMarkerScale\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIscale\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIscale\fP 1i +The marker scale factor. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the marker scale attribute. +Scale is multiplied by the nominal marker size for the display +device to produce a marker size +mapped to the nearest supported marker size. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetImpDepConstants , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetMarkerType - Set Marker Type +.XS + PEXSetMarkerType +.XE +.IN "PEXSetMarkerType" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetMarkerType\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImarker_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImarker_type\fP 1i +The marker type +.Pn ( PEXMarkerDot , +.PN PEXMarkerCross , +.PN PEXMarkerAsterisk , +.PN PEXMarkerCircle , +.PN PEXMarkerX ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the marker type attribute. +If the specified marker type is not supported, +.PN PEXMarkerAsterisk +is used. +Supported values for marker type are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetModelClipFlag - Set Model Clipping Flag +.XS + PEXSetModelClipFlag +.XE +.IN "PEXSetModelClipFlag" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetModelClipFlag\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIflag\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIflag\fP 1i +The model clipping flag +.Pn ( PEXClip +or +.PN PEXNoClip ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the model clip attribute. +Values for the model clip flag are +.PN PEXClip +(enable modeling clipping) and +.PN PEXNoClip +(disable modeling clipping). +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetModelClipVolume , +.PN PEXSetModelClipVolume2D , +.PN PEXRestoreModelClipVolume +.RE +.bp +.SH +PEXSetModelClipVolume - Set Model Clip Volume 3D +.XS + PEXSetModelClipVolume +.XE +.IN "PEXSetModelClipVolume" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetModelClipVolume\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIop\fP\^, unsigned int \fIcount\fP\^, PEXHalfSpace *\fIhalf_spaces\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIop\fP 1i +The model clipping volume operator +.Pn ( PEXModelClipReplace +or +.PN PEXModelClipIntersection ). +.IP \fIcount\fP 1i +The number of halfspaces. +.IP \fIhalf_spaces\fP 1i +An array of points and normal vectors defining the model clipping volume. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the model clip volume attribute. +The operator will be used to combine the specified list of half-spaces with +the current model clipping volume to form a new model clipping volume. +Values for the operator are +.PN PEXModelClipReplace +(replace current volume) +and +.PN PEXModelClipIntersection +(intersect specified volume with current volume). +Each half-space is defined by a point and a normal in model coordinates. +The normal points in the direction of the half-space, and the point +is considered to be on the plane. +See +.PN PEXGetImpDepConstants +for the maximum allowable number of model clip planes. +.LP +Each half-space is transformed by the current composite modeling transformation +and combined with the current model clipping volume. The resulting model +clipping volume is not affected by subsequent changes to the composite modeling +transformation. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + PEXCoord point; + PEXVector vector; +} PEXHalfSpace; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetModelClipFlag , +.PN PEXSetModelClipVolume2D , +.PN PEXRestoreModelClipVolume , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetModelClipVolume2D - Set Model Clip Volume 2D +.XS + PEXSetModelClipVolume2D +.XE +.IN "PEXSetModelClipVolume2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetModelClipVolume2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIop\fP\^, unsigned int \fIcount\fP\^, PEXHalfSpace2D *\fIhalf_spaces\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIop\fP 1i +The model clipping volume operator +.Pn ( PEXModelClipReplace +or +.PN PEXModelClipIntersection ). +.IP \fIcount\fP 1i +The number of halfspaces. +.IP \fIhalf_spaces\fP 1i +An array of points and normal vectors defining the model clipping volume. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the model clip volume attribute. +This output command is similar to +.PN PEXSetModelClipVolume +except +that the half-spaces are specified in 2D coordinates where the z-component +of each point and normal vector assumed to be zero. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + PEXCoord2D point; + PEXVector2D vector; +} PEXHalfSpace2D; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetModelClipFlag , +.PN PEXSetModelClipVolume , +.PN PEXRestoreModelClipVolume , +.br +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetPatternAttributes - Set Pattern Interior Style Attributes +.XS + PEXSetPatternAttributes +.XE +.IN "PEXSetPatternAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetPatternAttributes\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord *\fIref_point\fP\^, PEXVector *\fIvector1\fP\^, PEXVector *\fIvector2\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIref_point\fP 1i +The pattern reference point. +.IP \fIvector1\fP 1i +The first pattern reference vector. +.IP \fIvector2\fP 1i +The second pattern reference vector. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the pattern reference point and both pattern +reference vectors attributes, in modeling coordinates. +If the surface interior style is +.PN PEXInteriorStylePattern , +the pattern reference point and the pattern reference +vectors are used to to position and scale the pattern on the surface. +If either of the pattern reference vectors are zero length or if the +vectors are parallel, the output command is ignored. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetPatternAttributes2D - Set Pattern Interior Style Reference Point +.XS + PEXSetPatternAttributes2D +.XE +.IN "PEXSetPatternAttributes2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetPatternAttributes2D\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXCoord2D *\fIref_point\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIref_point\fP 1i +The pattern reference point. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the pattern reference point and both pattern reference vector attributes, +in 2D modeling coordinates. +The pattern reference +point is set to <x,y,0> and the two pattern reference vectors are set +to <1,0,0> and <0,1,0>. +If the surface interior style is +.PN PEXInteriorStylePattern , +the pattern reference point and the reference +vectors are used to position and scale the pattern on the surface. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetPatternSize - Set Pattern Interior Style Size +.XS + PEXSetPatternSize +.XE +.IN "PEXSetPatternSize" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetPatternSize\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIwidth\fP\^, double \fIheight\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIwidth\fP 1i +The pattern width. +.IP \fIheight\fP 1i +The pattern height. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the pattern size attribute. +Only the magnitude of the specified width and height is used. +The value (width,0) is +used as the pattern width vector, and the value (0,height) specifies +the pattern height vector. If the interior style is +.PN PEXInteriorStylePattern , +these values plus the pattern +reference point and the pattern reference vector are used to position, +scale, and rotate the pattern on the surface. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetParaSurfCharacteristics - Set Parametric Surface Characteristics +.XS + PEXSetParaSurfCharacteristics +.XE +.IN "PEXSetParaSurfCharacteristics" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetParaSurfCharacteristics\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIpsc_type\fP\^, PEXPSCData *\fIcharacteristics\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpsc_type\fP 1i +The parametric surface characteristic type +.Pn ( PEXPSCNone , +.PN PEXPSCImpDep , +.PN PEXPSCIsoCurves , +.PN PEXPSCMCLevelCurves , +.PN PEXPSCWCLevelCurves ). +.IP \fIcharacteristics\fP 1i +A pointer to data defining the parametric surface characteristics. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the parametric surface characteristics. +If the specified parametric surface characteristics type is not supported, +.PN PEXPSCNone +is used. +Supported values for parameteric surface characteristic types are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Data Structures +.ID +.Co +typedef union { + PEXPSCIsoparametricCurves iso_curves; + PEXPSCLevelCurves level_curves; + PEXPSCImpDepData imp_dep; +} PEXPSCData; +.sp +typedef struct { + unsigned short placement_type; + unsigned short reserved; + unsigned short u_count; + unsigned short v_count; +} PEXPSCIsoparametricCurves; +.sp +typedef struct { + PEXCoord origin; + PEXVector direction; + unsigned short count; /* number of parameters */ + unsigned short reserved; + float *parameters; +} PEXPSCLevelCurves; +.sp +typedef struct { + unsigned short length; + char *data; +} PEXPSCImpDepData; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetPickID - Set Pick Identifier +.XS + PEXSetPickID +.XE +.IN "PEXSetPickID" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetPickID\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned long \fIpick_id\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpick_id\fP 1i +The pick identifier. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the current pick identifier attribute. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetPolylineInterpMethod - Set Polyline Interpolation Method +.XS + PEXSetPolylineInterpMethod +.XE +.IN "PEXSetPolylineInterpMethod" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetPolylineInterpMethod\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImethod\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImethod\fP 1i +The polyline interpolation method +.Pn ( PEXPolylineInterpNone +or +.PN PEXPolylineInterpColor ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the polyline interpolation method attribute. +If the specified interpolation method is not supported, +.PN PEXPolylineInterpNone +is used. +Supported values for polyline interpolation method are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetReflectionAttributes - Set Surface Reflection Attributes +.XS + PEXSetReflectionAttributes +.XE +.IN "PEXSetReflectionAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetReflectionAttributes\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXReflectionAttributes *\fIattributes\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIattributes\fP 1i +The surface reflection attributes. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface reflection attributes. +Surface reflection attributes consist of +the ambient, diffuse and specular coefficients, +the specular concentration and color, +and the transmission coefficient. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + float ambient; + float diffuse; + float specular; + float specular_conc; + float transmission; + PEXColorSpecifier specular_color; +} PEXReflectionAttributes; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetReflectionModel - Set Surface Reflection Model +.XS + PEXSetReflectionModel +.XE +.IN "PEXSetReflectionModel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetReflectionModel\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImodel\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImodel\fP 1i +The surface reflection model +.Pn ( PEXReflectionNone , +.PN PEXReflectionAmbient , +.PN PEXReflectionDiffuse , +.PN PEXReflectionSpecular ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface reflection model attribute. +If the specified reflection model is not supported, +.PN PEXReflectionNone +is used. +Supported values for surface reflection model are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetRenderingColorModel - Set Rendering Color Model +.XS + PEXSetRenderingColorModel +.XE +.IN "PEXSetRenderingColorModel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetRenderingColorModel\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImodel\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImodel\fP 1i +The rendering color model +.Pn ( PEXRenderingColorModelImpDep , +.PN PEXRenderingColorModelRGB , +.PN PEXRenderingColorModelCIE , +.PN PEXRenderingColorModelHSV , +.PN PEXRenderingColorModelHLS ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the rendering color model attribute. +If the specified color model is not supported, an implementation-dependent +model (model 0) is used. +Supported values for rendering color model are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetSurfaceApprox - Set Surface Approximation Method +.XS + PEXSetSurfaceApprox +.XE +.IN "PEXSetSurfaceApprox" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceApprox\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImethod\fP\^, double \fIutolerance\fP\^, double \fIvtolerance\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImethod\fP 1i +The surface approximation method +.Pn ( PEXApproxImpDep , +.PN PEXApproxConstantBetweenKnots , +.PN PEXApproxWCChordalSize , +.PN PEXApproxNPCChordalSize , +.PN PEXApproxDCChordalSize , +.PN PEXSurfaceApproxWCPlanarDev , +.PN PEXSurfaceApproxNPCPlanarDev , +.PN PEXSurfaceApproxDCPlanarDev , +.PN PEXApproxWCRelative , +.PN PEXApproxNPCRelative , +.PN PEXApproxDCRelative ). +.IP \fIutolerance\fP 1i +The surface approximation tolerance in the u direction. +.IP \fIvtolerance\fP 1i +The surface approximation tolerance in the v direction. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface approximation method attribute. +If the specified method is not supported, +.PN PEXApproxImpDep +is used. +Supported values for surface approximation are inquirable via +.PN PEXGetEnumTypeInfo . +The u and v tolerance values +are provided to indicate the desired accuracy of the approximation, +and are used in different ways for the different methods. See +\fIChapter 4: Pipeline Contexts\fP +for more information about tolerance values. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetSurfaceColor - Set Surface Color +.XS + PEXSetSurfaceColor +.XE +.IN "PEXSetSurfaceColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the surface color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetSurfaceColorIndex - Set Surface Color Index +.XS + PEXSetSurfaceColorIndex +.XE +.IN "PEXSetSurfaceColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index surfaces. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface color attribute to an indexed color +with the value indicated by index. +If the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetSurfaceEdgeColor - Set Surface Edge Color +.XS + PEXSetSurfaceEdgeColor +.XE +.IN "PEXSetSurfaceEdgeColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceEdgeColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the surface edge color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface edge color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetSurfaceEdgeColorIndex - Set Surface Edge Color Index +.XS + PEXSetSurfaceEdgeColorIndex +.XE +.IN "PEXSetSurfaceEdgeColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceEdgeColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index for surface edges. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface edge color attribute +to an indexed color with the value indicated by +index. +If the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetSurfaceEdgeFlag - Set Surface Edge Flag +.XS + PEXSetSurfaceEdgeFlag +.XE +.IN "PEXSetSurfaceEdgeFlag" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceEdgeFlag\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIflag\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIflag\fP 1i +A flag indicating whether surface edge drawing is enabled or disabled +.Pn ( PEXOn +or +.PN PEXOff ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface edge flag attribute. +Values for the surface edge flag are +.PN PEXOn +(enable surface edges) +and +.PN PEXOff +(disable surface edges). +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetSurfaceEdgeType - Set Surface Edge Type +.XS + PEXSetSurfaceEdgeType +.XE +.IN "PEXSetSurfaceEdgeType" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceEdgeType\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIedge_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIedge_type\fP 1i +The surface edge type +.Pn ( PEXSurfaceEdgeSolid , +.PN PEXSurfaceEdgeDashed , +.PN PEXSurfaceEdgeDotted , +.PN PEXSurfaceEdgeDashDot ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface edge type attribute. +If the specified edge type is not supported, +.PN PEXSurfaceEdgeSolid +is used. +Supported values for surface edge type are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetSurfaceEdgeWidth - Set Surface Edge Width +.XS + PEXSetSurfaceEdgeWidth +.XE +.IN "PEXSetSurfaceEdgeWidth" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceEdgeWidth\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, double \fIwidth\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIwidth\fP 1i +The surface edge width scale factor. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface edge width attribute. +The specified width is used as a scale factor. +This scale factor is used to increase or decrease the width (in pixels) +from the nominal edge width for the display device. The result is +mapped to the nearest supported line width. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetImpDepConstants , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetSurfaceInterpMethod - Set Surface Interpolation Method +.XS + PEXSetSurfaceInterpMethod +.XE +.IN "PEXSetSurfaceInterpMethod" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetSurfaceInterpMethod\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fImethod\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fImethod\fP 1i +The surface interpolation method +.Pn ( PEXSurfaceInterpNone , +.PN PEXSurfaceInterpColor , +.PN PEXSurfaceInterpDotProduct , +.PN PEXSurfaceInterpNormal ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the surface interpolation method attribute. +If the specified interpolation method is not supported, +.PN PEXSurfaceInterpNone +is used. +Supported values for surface interpolation are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetEnumTypeInfo , +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetTextAlignment - Set Text Alignment +.XS + PEXSetTextAlignment +.XE +.IN "PEXSetTextAlignment" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextAlignment\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIhalignment\fP\^, int \fIvalignment\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIhalignment\fP 1i +The horizontal text alignment +.Pn ( PEXHAlignNormal , +.PN PEXHAlignLeft , +.PN PEXHAlignCenter , +.PN PEXHAlignRight ). +.IP \fIvalignment\fP 1i +The vertical text alignment +.Pn ( PEXVAlignNormal , +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase , +.PN PEXVAlignBottom ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the horizontal and vertical text alignment attributes. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetTextBundleIndex - Set Text Bundle Index +.XS + PEXSetTextBundleIndex +.XE +.IN "PEXSetTextBundleIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextBundleIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The text bundle table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text bundle index attribute. +If an undefined index is specified, the default bundle index one is used. +If index one is undefined, the defaults are used: text font index is one; text +precision is +.PN PEXStringPrecision ; +character expansion is 1.0; character spacing is 0.0 and text color is indexed +color one. +.LP +A text bundle table index of 0 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetTextColor - Set Text Color +.XS + PEXSetTextColor +.XE +.IN "PEXSetTextColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextColor\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +A pointer to the text color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text color attribute. +The attribute is set to either an +indexed color or a direct color value, +depending on the color type. +If the color type is +.PN PEXColorTypeIndexed +and the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Data Structures +.ID +.Co +See the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value, e.g. the color type is +.PN PEXColorTypeIndexed , +and the color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetTextColorIndex - Set Text Color Index +.XS + PEXSetTextColorIndex +.XE +.IN "PEXSetTextColorIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextColorIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The color table index for text. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text color attribute to an +indexed color with the value indicated by index. +If the specified color index is not defined, color index one is used. If +color index one is not defined, the result is implementation-dependent. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The color index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetTextFontIndex - Set Text Font Index +.XS + PEXSetTextFontIndex +.XE +.IN "PEXSetTextFontIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextFontIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The text font table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text font index attribute. +Index specifies the entry in the current +text font lookup table used to render text primitives. +If index is undefined, the default index one is used. If index one is +undefined, the result is implementation-dependent. +.LP +A text font table index less than 1 will produce a +.PN BadPEXOutputCommand +error. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF , +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetTextPath - Set Text Path +.XS + PEXSetTextPath +.XE +.IN "PEXSetTextPath" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextPath\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIpath\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIpath\fP 1i +The text (drawing) path +.Pn ( PEXPathRight , +.PN PEXPathLeft , +.PN PEXPathUp , +.PN PEXPathDown ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text path attribute. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetTextPrecision - Set Text Precision +.XS + PEXSetTextPrecision +.XE +.IN "PEXSetTextPrecision" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTextPrecision\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIprecision\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIprecision\fP 1i +The text precision +.Pn ( PEXStringPrecision , +.PN PEXCharPrecision , +.PN PEXStrokePrecision ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the text precision attribute. +.LP +When text or annotation text is interpreted, the fragments in the text +string are rendered in the same text precision. If the font group selected +by the current text font index consists of both X and PEX fonts, and if some +of the string fragments in the string are rendered in X fonts, the text +precision of the entire string must be dropped to at least +.PN PEXCharPrecision . +.LP +If a character set value is not available in the current font group, then the +entire string is rendered using the default font group. If a character set +value is not available in the default font group, then that portion of the +string is rendered in an implementation-dependent manner. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetIndividualASF +.RE +.bp +.SH +PEXSetViewIndex - Set View Index +.XS + PEXSetViewIndex +.XE +.IN "PEXSetViewIndex" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetViewIndex\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, unsigned int \fIindex\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIindex\fP 1i +The view table index. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an output primitive attribute which +sets the view index attribute. +If the specified view index is not defined, the default index zero is used. +If view index zero is undefined, the default values are used: all clip flags +are on; the clip limits are set to <0,0,0> , <1,1,1>; orientation and mapping +are the identity matrices. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The view index value exceeds 65534. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter02.4 b/xc/doc/specs/PEX5/PEXlib/chapter02.4 new file mode 100644 index 000000000..cf657e873 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter02.4 @@ -0,0 +1,369 @@ +.NH 2 +Structure Related and No-op Functions +.XS +\*(SN Structure Related and No-op Functions +.XE +.LP +.IN "output commands" +.IN "structure" +.IN "no-op" +There are some output commands that either relate to only structure +resources or that do not directly cause anything to be rendered. +The output commands in this category are application data, execute structure, +generalized structure element, label and no-op. +Label, no-op and application data +have no visible effect when rendered. +A label command is used to position the element pointer in a structure. +For more information on labels, see \fIChapter 7: Structures\fP. +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* similar to XErrorEvent - use to access additional info in OC error */ +.ID +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XID resourceid; /* resource id of renderer or structure */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error code of failed request */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ + unsigned short op_code; /* op-code of failed output command */ + unsigned short count; /* number of output commands successfully */ + /* executed before error */ +} PEXOCErrorEvent; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXApplicationData - Structure Application Data +.XS + PEXApplicationData +.XE +.IN "PEXApplicationData" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXApplicationData\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIlength\fP\^, char *\fIdata\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIlength\fP 1i +The length, in bytes, of the application data. +.IP \fIdata\fP 1i +A pointer to the application data. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an +application data output command +which has no visible effect when rendered. +It is typically used to store arbitrary application data in a structure. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXExecuteStructure - Execute Structure +.XS + PEXExecuteStructure +.XE +.IN "PEXExecuteStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXExecuteStructure\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, PEXStructure \fIstructure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates an +execute structure output command +which causes the specified structure to be executed during structure traversal. +Executing a structure consists of these steps: +.ID +1. Save the current state of the rendering pipeline. +2. Set the global transform to the current composite modeling transform. +3. Set the local transform to the identity matrix. +4. Process all structure elements in the called structure. +5. Restore the state saved at step 1. +.DE +If structure does not exist at the time +.PN PEXExecuteStructure +is processed, a +.PN BadPEXOutputCommand +error is produced. The structure must first be created. +.RE +.SH +Errors +.RS +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXBeginStructure , +.PN PEXEndStructure +.RE +.bp +.SH +PEXGSE - Generalized Structure Element +.XS + PEXGSE +.XE +.IN "PEXGSE" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXGSE\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, long \fIid\fP\^, int \fIlength\fP\^, char *\fIdata\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIid\fP 1i +The identifier of the GSE. +.IP \fIlength\fP 1i +The length, in bytes, of the GSE data. +.IP \fIdata\fP 1i +A pointer to the GSE data. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a generalized structure element. +.LP +The complete interface and behavior for each GSE identifier +should be available with the individual PEX server implementations. +There are no standard PEX GSEs. +If the specified GSE identifier is not supported, +then the output command is ignored. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXLabel - Structure Label +.XS + PEXLabel +.XE +.IN "PEXLabel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXLabel\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, long \fIlabel\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIlabel\fP 1i +A value to be used as a label. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a +label output command which +has no visible effect. Its primary function comes when it is stored in a +structure, as labels can be used in various element pointer positioning +operations. Labels within a particular structure need not be unique. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXDeleteToLabel , +.PN PEXDeleteBetweenLabels , +.PN PEXSetElementPtrAtLabel +.RE +.bp +.SH +PEXNoop - Noop Output Command +.XS + PEXNoop +.XE +.SH +Synopsis +.RS +.FD 0 +void PEXNoop\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^) +.FN +.RE +.IN "PEXNoop" "" "@DEF@" +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function creates a +no-op output command which, when rendered, will do nothing except update the +current path. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter03 b/xc/doc/specs/PEX5/PEXlib/chapter03 new file mode 100644 index 000000000..bb78f0a29 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter03 @@ -0,0 +1,1628 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 3\fP\s-1 + +\s+1\fBLookup Tables\fP\s-1 +.sp 2 +.nr H1 3 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 3: Lookup Tables +.XE +.IN "lookup tables" +.LP +A lookup table is a PEX resource that allows clients +to create tables of values for various purposes. Lookup +tables are used to support bundling of +output primitive attributes as well as for storing view information, +light source descriptions, depth-cue information, etc. +.LP +Most attributes are normally obtained directly from the current state +values of the rendering pipeline. Certain output primitive attributes (e.g., +line color, marker type, surface interpolation method) have a related +attribute, an aspect source flag, that indicates whether to obtain the +attribute's value from the current pipeline state or from a specific entry +in a lookup (bundle) table resource. Other attributes (e.g., viewing, +depth-cueing parameters) are not stored as rendering pipeline state. +Rather, these attributes are always obtained from a lookup table, +and an index is stored as part of the rendering pipeline state to indicate +the lookup table entry that is to be used. +.LP +Tables may be sparse (i.e. table indices need not be contiguous), therefore +tables consist of index/entry pairs. +The index is the numeric value that is used to access the data stored +in an entry. The range of allowable indices for each type of +table is given in the description of each table type. +An entry is the collection of information (or the data record) that +is defined for each type of table. The table descriptions in this section +include the definition of an entry for each type of table. +A table entry may contain one or more values, depending on the table +type. For instance, in the +.PN PEXLUTMarkerBundle +table type, each entry +in the table consists of a marker type value, a marker scale +value and a marker color value. +.LP +A lookup table may have predefined entries. These are entries that +are filled in automatically by the server when the table is created. +Predefined table entries may be overwritten. Each table also has +a table index that is designated as the default index. +If a specified table index is not defined, the contents +of the default table index will be used instead. If the contents of the entry +for the +default table index are not defined, then the default attribute values +will be used. The default index for all tables +is index one, except for the view, depth cue, and color approximation +tables, whose default index is index zero. +.LP +PEX lookup tables also support set versus realized semantics. A lookup table +entry may be set to a value that is not exactly representable during rendering. +This does not mean that a lookup table entry may be set to a value that is not +supported by the implementation, such as enumerated types. Supported +enumerated types are inquirable via +.PN PEXGetEnumTypeInfo . +However, some supported enumerated types may not be realizable, +and so may have to be approximated during rendering. This +approximation is called the realized value. Such values will be silently +mapped to an approximation during rendering. When retrieving entry values +from a lookup table, applications may request the value as originally +specified (the set value) or the value that is actually used when rendering +(the realized value). In many cases, the set and realized values will be the +same, but in some cases, they may not. All predefined entries are, by +definition, realizable. +.LP +Types of Lookup Tables +.LP +The types of lookup tables defined are: +.ID +color approximation table +color table +depth cue table +edge bundle table +interior bundle table +light table +line bundle table +marker bundle table +pattern table +text bundle table +text font table +view table +.DE +Each of these types of lookup tables is described in detail +in the following sections. +.NH 2 +Color Approximation Lookup Tables +.XS +\*(SN Color Approximation Lookup Tables +.XE +.IN "color approximation table" +.LP +A color approximation table defines how a renderer will transform +rendering pipeline color values into pixel values. +An entry in a color approximation table may be defined using +the +.PN PEXColorApproxEntry +data type which consists of the following fields: +.ID +.fi +type - +.PN PEXColorSpace +or +.PN PEXColorRange +.br +model - +.PN PEXColorApproxRGB , +.PN PEXColorApproxCIE , +'in +.5i +.PN PEXColorApproxHSV , +.PN PEXColorApproxHLS , +or +.PN PEXColorApproxYIQ +.in -.5i +.nf +max1 - maximum value for first component of converted color +max2 - maximum value for second component of converted color +max3 - maximum value for third component of converted color +mult1 - multiplier for positioning first component within computed pixel value +mult2 - multiplier for positioning second component within computed pixel value +mult3 - multiplier for positioning third component within computed pixel value +.fi +weight1 - weight value for first component for +.PN PEXColorRange +type +.br +weight2 - weight value for second component for +.PN PEXColorRange +type +.br +weight3 - weight value for third component for +.PN PEXColorRange +type +.nf +base_pixel - value to add to computed pixel value +dither - hint as to whether to perform dithering +.DE +After a renderer has performed illumination, depth-cueing and clipping +operations, it is left with a rendering pipeline color that must be converted +to a displayable pixel value. The renderer's current color approximation index +determines which entry in the color approximation table is used to perform the +conversion. The rendering pipeline color value is first converted, only if +necessary, to a color in the color space specified by the color model. The +type of color approximation is then applied. +.LP +If the type is +.PN PEXColorSpace , +each component of the converted color is +scaled by the corresponding maximum value (max1, max2, max3). These +are used by the client to indicate the number of entries in the +colormap for each color axis, minus 1. For example, to compute a pixel value +for a 3-3-2 RGB colormap allocation, the maximum values would be 7, 7, and 3. +The resulting color components are packed into +a single pixel value by multiplying the first component by mult1, the second +by mult2, the third by mult3, and then adding those three values together +with the base pixel value. +The weight1, weight2 and weight3 values are not used for +.PN PEXColorSpace . +.LP +If the type is +.PN PEXColorRange , +each component of the converted color from the +rendering pipeline is multiplied by its corresponding weight value, after the +weights have been normalized, and then the terms are added together to form +a single value. The weight values can be adjusted to allow equal weighting +of the components (weights are all equal) or to minimize or eliminate one or +more of the components (one or more weights equal to 0). For instance, the +weight values of 0.30, 0.59, 0.11 would convert an RGB value to a single-valued +intensity according to the NTSC color standard. +.LP +Next, the computed value is multiplied by max1, +which should be set to represent the number of color map entries in +the range, minus 1. Max2 and max3 are not used. +The value is then replicated for each of +the three color components, which are then multiplied by mult1, mult2 and +mult3 respectively, and then added together with the base pixel to form the +final pixel value. +For instance, if an application desires to display its computed image on a +pseudo-color display using +gray scale, it could allocate 100 contiguous color cells in the color map, and +set max1 to the value 99, so that intensity values would be mapped into +the range [0,99]. +For visuals that use a single component to create a pixel +value (e.g., PseudoColor), the application must specify the appropriate +multipliers to select the appropriate channel (e.g. multipliers of 1.0, 0.0, +and 0.0 could be used for a visual type of PseudoColor). +.LP +The use of addition rather than logical OR for composing pixel values permits +allocations where the primary components are not allocated into distinct +bit-planes. Since some hardware allows a performance improvement if the +multiplication values are powers of two, +.PN PEXGetImpDepConstants +can be +called to get an indication of whether powers of two are preferred. +.LP +.IN "dithering" +Dither is a hint as to whether +some attempt at dithering should be performed. Whether dithering +is supported (and the dithering algorithm that is used) are +implementation-dependent. See +.PN PEXGetImpDepConstants . +.LP +The default index for color approximation tables is index zero, and index +values may be in the range [0,65534], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Color Lookup Tables +.XS +\*(SN Color Lookup Tables +.XE +.IN "color table" +.LP +Color lookup tables (not to be confused with X color map resources) +are used when dereferencing indexed color values. +All color values in a color lookup +table must therefore be specified as direct colors by using the +.PN PEXColorEntry +data type which consists of the following fields: +.ID +.fi +type - +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +'in +.5i +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +or +.PN PEXColorTypeRGB16 +.in -.5i +.nf +value - direct color value to be used for this index +.DE +The default index for color tables is one, and index +values may be in the range [0,65534], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Depth Cue Lookup Tables +.XS +\*(SN Depth Cue Lookup Tables +.XE +.IN "depth cue table" +.LP +Depth cue tables maintain depth-cueing information. +An entry in a depth-cue table may be defined using +the +.PN PEXDepthCueEntry +data type which consists of the following fields: +.ID +.fi +mode - +.PN PEXOn +or +.PN PEXOff +.nf +front_plane - the Z coordinate of the front reference plane +back_plane - the Z coordinate of the back reference plane +front_scaling - scaling factor to use at front reference plane +back_scaling - scaling factor to use at back reference plane +color - type and value of color to which others attenuate +.DE +The depth-cueing computation modifies colors according to the distance from +the viewing position. The depth-cue color indicates the color to which objects +will tend when going from the front plane to the back plane. The front and +back scaling specify the values by which the colors will be scaled at the front +and back depth-cueing planes. The depth-cueing computation is performed in +NPC space -- the front plane is specified as the distance to the front +depth-cueing plane in NPC coordinates and the back plane is specified as the +distance to the back depth-cuing plane in NPC coordinates. +.LP +The default index for depth cue tables is zero, and index +values may be in the range [0,65534], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Edge Bundle Lookup Tables +.XS +\*(SN Edge Bundle Lookup Tables +.XE +.IN "edge bundle lookup table" +.LP +The edge bundle lookup table maintains attributes for +drawing edges of surface primitives. If the attribute source flag +has been appropriately set, surface edge attributes may be +obtained from the edge bundle table. +An entry in an edge bundle table may be defined using +the +.PN PEXEdgeBundleEntry +data type which consists of the following fields: +.ID +.fi +edge_flag - +.PN PEXOn +or +.PN PEXOff +.br +type - +.PN PEXSurfaceEdgeSolid , +.PN PEXSurfaceEdgeDashed , +'in +.5i +.PN PEXSurfaceEdgeDotted , +or +.PN PEXSurfaceEdgeDashDot +.in -.5i +.nf +width - scale factor applied to the nominal width of surface edges +color - type and value of color to be used when drawing surface edges +.DE +The attributes stored in the edge bundle table are defined +and used in the same fashion as the pipeline context +attributes of the same name. +.LP +The default index for edge bundle tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Interior Bundle Lookup Tables +.XS +\*(SN Interior Bundle Lookup Tables +.XE +.IN "interior bundle lookup table" +.LP +The interior bundle table maintains attributes for +drawing surface primitives. If the attribute source flag has been +appropriately set, surface attributes may be obtained from the +interior bundle table. +An entry in an interior bundle table may be defined using +the +.PN PEXInteriorBundleEntry +data type which consists of the following fields: +.ID +.fi +style - +.PN PEXInteriorStyleHollow , +.PN PEXInteriorStyleSolid , +'in +.5i +.PN PEXInteriorStylePattern , +.PN PEXInteriorStyleHatch , +or +.PN PEXInteriorStyleEmpty +.in -.5i +.br +style_index - index to pattern or hatch style +.br +reflection_model - +.PN PEXReflectionNone , +.PN PEXReflectionAmbient , +'in +.5i +.PN PEXReflectionDiffuse , +or +.PN PEXReflectionSpecular +.in -.5i +.br +interp_method - +.PN PEXSurfaceInterpNone , +.PN PEXSurfaceInterpColor , +'in +.5i +.PN PEXSurfaceInterpDotProduct , +or +.PN PEXSurfaceInterpNormal +.in -.5i +.nf +bf_style - same as style, but for back-facing surfaces +bf_style_index - same as style_index, but for back-facing surfaces +bf_reflection_model - same as reflection_model, but for back-facing surfaces +bf_interp_method - same as interp_method, but for back-facing surfaces +surface_approx - method and tolerances used to approximate surface primitives +color - type and value of color to be used when drawing surface primitives +reflection_attr - attributes to be used when computing reflection from surface primitives +bf_color - same as color, but for back-facing surfaces +bf_reflection_attr - same as reflection_attr, but for back-facing surfaces +.DE +The attributes stored in the interior bundle table are +defined and used in the same fashion as the pipeline context +attributes of the same name. +.LP +The default index for interior bundle tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Light Lookup Tables +.XS +\*(SN Light Lookup Tables +.XE +.IN "light lookup table' +.LP +A light table maintains light source definitions for use in +reflectance calculations. +An entry in a light table may be defined using +the +.PN PEXLightEntry +data type which consists of the following fields: +.ID +.fi +type - +.PN PEXLightAmbient , +.PN PEXLightWCVector , +.PN PEXLightWCPoint , +or +.PN PEXLightWCSpot +.nf +direction - direction of light source (a unit length vector which points away from the light) +point - position of light source +concentration - concentration exponent +spread_angle - half-angle +attenuation1 - light attenuation factor 1 +attenuation2 - light attenuation factor 2 +color - type and value of color of light source +.DE +Light type must be one of the constants +.PN PEXLightAmbient , +.PN PEXLightWCVector , +.PN PEXLightWCPoint , +.PN PEXLightWCSpot . +A server implementation +may not support all light types, and may define some new ones. (See +.PN PEXGetEnumTypeInfo .) +Depending upon the type of light, some of the values +in a light table entry may be ignored. +.LP +An ambient light source is defined by color. It is a non-directional light +that affects the color of all surfaces regardless of their orientation. Each +ambient light causes a constant amount of intensity to be added to each point +in the scene. +.LP +A world coordinate vector light source (or directional light source) is defined +by direction and color. This type of light is located at +infinity so all light rays which emanate from it are parallel when they strike +an object's surface. +.LP +A world coordinate point light source (or positional light source) is defined +by color, a position in world coordinates, and attenuation. Positional lights +illuminate equally in all directions. The attenuation indicates how the +intensity of the point light source drops off as a function of distance. +.LP +A world coordinate spot light source simulates the behavior +of a spotlight and is defined by direction, position, concentration, a spread +angle, attenuation and color. The direction and spread angle specify a cone of +influence. The direction vector is relative to the specified position, and the +spread angle is the half-angle of the cone. The contribution of the spotlight +is zero if the point in question lies outside the cone of influence. +.LP +There may be a limit to the number of non-ambient lights that can be enabled +at one time. See +.PN PEXGetImpDepConstants. +.LP +The default index for light tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Line Bundle Lookup Tables +.XS +\*(SN Line Bundle Lookup Tables +.XE +.IN "line bundle lookup table" +.LP +Line bundle tables maintain attributes for drawing polyline +and curve primitives. If the attribute source flag has been +appropriately set, polyline and curve attributes may be obtained from +a line bundle table. An entry in a line bundle table may be defined using +the +.PN PEXLineBundleEntry +data type which consists of the following fields: +.ID +.fi +type - +.PN PEXLineTypeSolid , +.PN PEXLineTypeDashed , +'in +.5i +.PN PEXLineTypeDotted , +or +.PN PEXLineTypeDashDot +.in -.5i +.br +interp_method - +.PN PEXPolylineInterpNone +or +.PN PEXPolylineInterpColor +.nf +curve_approx - approximation method and tolerance to be used to draw curve primitives +width - scale factor applied to the nominal width of lines and curves +color - type and value of color to be used when drawing lines and curves +.DE +The attributes stored in a line bundle table are defined and used +in the same way as the pipeline context attributes of the same name. +.LP +The default index for line bundle tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Marker Bundle Lookup Tables +.XS +\*(SN Marker Bundle Lookup Tables +.XE +.IN "marker bundle lookup table" +.LP +Marker bundle tables maintain attributes for +drawing marker primitives. If the attribute source flag has been +appropriately set, marker attributes may be obtained from a +marker bundle table. +An entry in a marker bundle table may be defined using +the +.PN PEXMarkerBundleEntry +data type which consists of the following fields: +.ID +.fi +type - +.PN PEXMarkerDot , +.PN PEXMarkerCross , +'in +.5i +.PN PEXMarkerAsterisk , +.PN PEXMarkerCircle , +or +.PN PEXMarkerX +.in -.5i +.nf +scale - scale factor to be applied to marker +color - type and value of color to be used to draw markers +.DE +The attributes stored in a marker bundle table are defined and used +in the same way as the pipeline context attributes of the same name. +.LP +The default index for marker bundle tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Pattern Lookup Tables +.XS +\*(SN Pattern Lookup Tables +.XE +.IN "pattern lookup table" +.LP +An entry in a pattern table may be defined using the +.PN PEXPatternEntry +data type which consists of the following fields: +.ID +color_type - type of color values +row_count - number of rows in the colors array +col_count - number of columns in the colors array +colors - an array of colors defining the pattern +.DE +.LP +The pattern table defines the available patterns for use when the pipeline +interior style or back-facing interior style attribute is +.PN PEXInteriorStylePattern . The interior style index and back-facing +interior style index attributes specify the table index to be used. +The colors are stored row-major with the upper-left hand cell being the first +in the list of colors followed by the remaining cells in the first row, then +the second row, and so on. +.LP +The default index for pattern tables is one, and index values may be in +the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Text Bundle Lookup Tables +.XS +\*(SN Text Bundle Lookup Tables +.XE +.IN "text bundle lookup table" +.LP +The text bundle lookup table maintains attributes for +drawing text and annotation text primitives. If the attribute source +flag has been appropriately set, text and annotation text attributes +may be obtained from a text bundle lookup table. +An entry in a text bundle table may be defined using +the +.PN PEXTextBundleEntry +data type which consists of the following fields: +.ID +font_index - index of text font to be used +.fi +precision - +.PN PEXStringPrecision , +.PN PEXCharPrecision , +or +.PN PEXStrokePrecision +.nf +char_expansion - horizontal character scaling factor +char_spacing - spacing to be used between characters +color - type and value of color to be used to draw text +.DE +The attributes stored in a text bundle table are defined and used +in the same way as the pipeline context attributes of the same name. +.LP +The default index for text bundle tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +Text Font Lookup Tables +.XS +\*(SN Text Font Lookup Tables +.XE +.IN "text font lookup table" +.LP +Text font tables maintain a list of PEX and X11 font groups. +Font groups are selected using the text font index. +Inside a font group a specific font is selected by the character set attribute +of a mono encoding. (A mono encoding is a portion of a text string.) +An entry in a text font lookup table may be defined using a +.PN PEXTextFontEntry +data type which consists of the following fields: +.ID +count - the number of PEX fonts in the fonts array +fonts - a pointer to the array of font identifiers +.DE +The default index for text font tables is one, and index +values may be in the range [1,65535], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.NH 2 +View Lookup Tables +.XS +\*(SN View Lookup Tables +.XE +.IN "view lookup table" +.LP +A view table maintains viewing information. +"Views" are specified as indices, which are used to identify +the appropriate information in a view table. +An entry in the view table may be defined using the +.PN PEXViewEntry +data type which consists of the following fields: +.ID +.fi +clip_flags - a mask made up of +.PN PEXClipXY , +.PN PEXClipBack , +'in +.5i +.PN PEXClipFront , +.PN PEXClippingAll +.in -.5i +.nf +clip_limits - endpoints of diagonal that defines clipping volume +orientation - view orientation transformation matrix +mapping - view mapping transformation matrix +.DE +The clip limits specify the minimum and maximum values of a +rectangular volume in normalized projection coordinates. +Clip flags contains three flags +that indicate whether to clip against the side, back, and front +planes of the volume specified by clip limits. +Use the +constants +.PN PEXClipXY , +.PN PEXClipBack , +.PN PEXClipFront , +or +.PN PEXClippingAll +(which sets all three clipping flags) for use in constructing the value for +clip flags. +The actual clipping volume for each view is a rectangular parallelpiped that is +computed by taking the intersection of the view clipping volume (determined by +the clip limits and the clip flags) and the NPC subvolume. +.LP +Orientation is a transformation matrix that maps geometry in world +coordinates to viewing reference coordinates (also known as viewing +coordinates). +Mapping is a transformation matrix that maps geometry in view +reference coordinates to normalized projection coordinates. The mapping +transformation is typically a parallel or perspective projection. +Both of these matrices are 4-by-4 row-major matrices. All coordinate systems +in PEX are right-handed coordinate systems. +.LP +The default index for view tables is zero, and index +values may be in the range [0,65534], of which there are n definable entries +(see +.PN PEXGetTableInfo +to obtain the value of n). +.bp +.XS +Function Descriptions +.XE +.SH +PEXCopyLookupTable - Copy Lookup Table +.XS + PEXCopyLookupTable +.XE +.IN "PEXCopyLookupTable" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyLookupTable\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fIsrc_table\fP\^, PEXLookupTable \fIdst_table\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIsrc_table\fP 1i +The resource identifier of the source lookup table. +.IP \fIdst_table\fP 1i +The resource identifier of the destination lookup table. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies entries from the source lookup table to +destination lookup table, after first deleting all entries in the destination +lookup table. Both tables must already exist as valid +lookup table resources. Both must have been created for +the same class of drawables, and both must be the same +table type. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadMatch\fP 1i +The specified lookup tables were not created with compatible drawables. +.IP \fIBadPEXLookupTable\fP 1i +A specified lookup table resource identifier is invalid, or the table type is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXCreateLookupTable - Create Lookup Table +.XS + PEXCreateLookupTable +.XE +.IN "PEXCreateLookupTable" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXLookupTable PEXCreateLookupTable\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, int \fItable_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fItable_type\fP 1i +The type of lookup table to be created (see the Description). +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created lookup table. +.RE +.SH +Description +.RS +.LP +This function creates a lookup table resource of the specified type and +returns the resource identifier of the +new lookup table. The returned identifier is used to +refer to the created lookup table. The type of +lookup table to be created must be one of the following: +.ID +.PN PEXLUTColorApprox +.PN PEXLUTColor +.PN PEXLUTDepthCue +.PN PEXLUTEdgeBundle +.PN PEXLUTInteriorBundle +.PN PEXLUTLight +.PN PEXLUTLineBundle +.PN PEXLUTMarkerBundle +.PN PEXLUTPattern +.PN PEXLUTTextBundle +.PN PEXLUTTextFont +.PN PEXLUTView +.DE +The newly-created lookup table can +only be used with drawables having the same depth and root as +the specified drawable. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.IP \fIBadPEXLookupTable\fP 1i +The specified table type is unsupported. +.IP \fIBadValue\fP 1i +The specified table type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeLookupTable +.RE +.bp +.SH +PEXDeleteTableEntries - Delete Lookup Table Entries +.XS + PEXDeleteTableEntries +.XE +.IN "PEXDeleteTableEntries" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXDeleteTableEntries\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^, unsigned int \fIstart\fP\^, unsigned int \fIcount\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table. +.IP \fIstart\fP 1i +The initial table entry to be deleted. +.IP \fIcount\fP 1i +The number of entries to be deleted. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes lookup table entries from the specified lookup table, +starting at the specified entry. +Entries with index values between the start and +(start + count-1), inclusive, are deleted. Attempts to delete +undefined entries are ignored. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid, or the table type is unsupported. +.IP \fIBadValue\fP 1i +The sum of start and count is too large, or index 0 is invalid for the specified table type. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetTableInfo , +.PN PEXGetPredefinedEntries , +.PN PEXGetDefinedIndices +.RE +.bp +.SH +PEXFreeLookupTable - Free Lookup Table +.XS + PEXFreeLookupTable +.XE +.IN "PEXFreeLookupTable" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeLookupTable\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the association between the lookup table +resource identifier +and the lookup table. The lookup table is freed +when no other resource references it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXFreeTableEntries - Free Storage associated with Tables Entries Return Parameters +.XS + PEXFreeTableEntries +.XE +.IN "PEXFreeTableEntries" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeTableEntries\^(\^int \fItable_type\fP\^, unsigned int \fIcount\fP\^, PEXPointer \fIentries\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItable_type\fP 1i +The type of table entries in the array. +.IP \fIcount\fP 1i +The number of entries in the array. +.IP \fIentries\fP 1i +An array of table entries. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.LP +This function deallocates memory returned by +.PN PEXGetPredefinedEntries , +.PN PEXGetTableEntries , +.PN PEXGetTableEntry +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetPredefinedEntries , +.PN PEXGetTableEntries , +.PN PEXGetTableEntry +.RE +.bp +.SH +PEXGetDefinedIndices - Get Lookup Table Defined Indices +.XS + PEXGetDefinedIndices +.XE +.IN "PEXGetDefinedIndices" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetDefinedIndices\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^, unsigned long *\fIcount_return\fP\^, PEXTableIndex **\fIindices_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table. +.IP \fIcount_return\fP 1i +Returns the number of returned indices. +.IP \fIindices_return\fP 1i +Returns an array of indices to defined table entries. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the defined indices for the specified lookup table. +The index +of each defined table entry is returned in a list. +.LP +PEXlib allocates memory for the returned indices. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +typedef unsigned short PEXTableIndex; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid, or the table type is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetTableInfo +.RE +.bp +.SH +PEXGetPredefinedEntries - Get Lookup Table Predefined Indices +.XS + PEXGetPredefinedEntries +.XE +.IN "PEXGetPredefinedEntries" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetPredefinedEntries\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, int \fItable_type\fP\^, unsigned int \fIstart\fP\^, unsigned int \fIcount\fP\^, PEXPointer *\fIentries_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fItable_type\fP 1i +The type of lookup table (see the Description). +.IP \fIstart\fP 1i +The index of the first predefined entry to be returned. +.IP \fIcount\fP 1i +The number of predefined entries requested. +.IP \fIentries_return\fP 1i +Returns an array of predefined table entries. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the predefined entries for the specified lookup +table. +The type must be one of the following: +.ID +.PN PEXLUTColorApprox +.PN PEXLUTColor +.PN PEXLUTDepthCue +.PN PEXLUTEdgeBundle +.PN PEXLUTInteriorBundle +.PN PEXLUTLight +.PN PEXLUTLineBundle +.PN PEXLUTMarkerBundle +.PN PEXLUTPattern +.PN PEXLUTTextBundle +.PN PEXLUTTextFont +.PN PEXLUTView +.DE +Predefined entries are those automatically filled with valid data +when a lookup table is created. +The query is conducted based on the assumption that the +lookup table would be used on drawables with the same root and depth as +the specified drawable. The function returns at most the specified number of +entries, starting with the specified entry index. +The number of entries requested can not be larger than the number of predefined +entries. Call +.PN PEXGetTableInfo +to determine the number of predefined entries. +.LP +Entries in the returned list depend on the type specified. +See +.PN PEXSetTableEntries +for the structure types. +.LP +PEXlib allocates the memory for the returned table entries. +.PN PEXFreeTableEntries +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +#if NeedFunctionPrototypes +typedef void *PEXPointer; +#else +typedef char *PEXPointer; +#endif +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.IP \fIBadValue\fP 1i +The specified table type is invalid or unsupported, start is less than the +minimum predefined entry, the sum of start and count is greater than the +maximum predefined entry, or index 0 is not valid for the specified table type. +.IP \fIBadPEXLookupTable\fP 1i +The specified table type is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetTableInfo , +.PN PEXGetDefinedIndices , +.br +.PN PEXGetTableEntry , +.PN PEXGetTableEntries , +.PN PEXSetTableEntries +.RE +.bp +.SH +PEXGetTableEntries - Get Lookup Table Entries +.XS + PEXGetTableEntries +.XE +.IN "PEXGetTableEntries" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetTableEntries\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^, unsigned int \fIstart\fP\^, unsigned int \fIcount\fP\^, int \fIvalue_type\fP\^, int *\fItable_type_return\fP\^, PEXPointer *\fIentries_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table from which +the table entries are to be obtained. +.IP \fIstart\fP 1i +The index of the first lookup table entry to be returned. +.IP \fIcount\fP 1i +The number of entries requested. +.IP \fIvalue_type\fP 1i +The type of values to return +.Pn ( PEXSetValue +or +.PN PEXRealizedValue ). +.IP \fItable_type_return\fP 1i +Returns the type of table. +.IP \fIentries_return\fP 1i +Returns an array of table entries. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the values associated with a range of contiguous table +indices, starting at the specified entry index. +If a table entry in the requested range is +not defined, the default entry for a table of this type is returned. +.LP +The type of entries in the returned list depend on the returned table type. +See +.PN PEXSetTableEntries +for the structure types. +.LP +If the requested value type is +.PN PEXSetValue , +the values returned will be those originally set in the table entry. +If the requested value type is +.PN PEXRealizedValue , +the values returned will be those actually used during rendering (i.e. the +values used if the specified entry value can not be exactly matched). +.LP +PEXlib allocates the memory for the returned entries. +.PN PEXFreeTableEntries +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.sp +#if NeedFunctionPrototypes +typedef void *PEXPointer; +#else +typedef char *PEXPointer; +#endif +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid, or the table type is unsupported. +.IP \fIBadValue\fP 1i +The sum of start and count is too large, or index 0 is invalid for the specified table type. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetTableInfo , +.PN PEXGetPredefinedEntries , +.br +.PN PEXGetDefinedIndices , +.PN PEXGetTableEntry , +.PN PEXSetTableEntries +.RE +.bp +.SH +PEXGetTableEntry - Get Lookup Table Entry +.XS + PEXGetTableEntry +.XE +.IN "PEXGetTableEntry" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPointer PEXGetTableEntry\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^, unsigned int \fIindex\fP\^, int \fIvalue_type\fP\^, int *\fIstatus_return\fP\^, int *\fItable_type_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table. +.IP \fIindex\fP 1i +The index of the entry to be returned from the lookup table. +.IP \fIvalue_type\fP 1i +The type of values to return +.Pn ( PEXSetValue +or +.PN PEXRealizedValue ). +.IP \fIstatus_return\fP 1i +Returns the entry status, either +.PN PEXDefinedEntry +if the specified lookup table entry is defined or +.PN PEXDefaultEntry +if it is undefined. +.IP \fItable_type_return\fP 1i +Returns the type of table. +.RE +.SH +Returns +.RS +.LP +A pointer to the lookup table entry; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns a single entry from the specified lookup table. +If the specified lookup table entry is defined, the defined +entry is returned. If the specified lookup table entry is not +defined, the default entry for that type +of table is returned. +.LP +The type of structure returned depends on the specified type. +See +.PN PEXSetTableEntries +for the structure types. +.LP +If the requested value type is +.PN PEXSetValue , +the values returned will be those originally set in the table entry. +If the requested value type is +.PN PEXRealizedValue , +the values returned will be those actually used during rendering (i.e. the +values used if the specified entry value can not be exactly matched). +.LP +PEXlib allocates memory for the returned entry. +.PN PEXFreeTableEntries +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.sp +#if NeedFunctionPrototypes +typedef void *PEXPointer; +#else +typedef char *PEXPointer; +#endif +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid, or the table type is unsupported. +.IP \fIBadValue\fP 1i +Index 0 is invalid for the specified table type. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetTableInfo , +.PN PEXGetPredefinedEntries , +.br +.PN PEXGetDefinedIndices , +.PN PEXGetTableEntries , +.PN PEXSetTableEntries +.RE +.bp +.SH +PEXGetTableInfo - Get Lookup Table Information +.XS + PEXGetTableInfo +.XE +.IN "PEXGetTableInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetTableInfo\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, int \fItable_type\fP\^, PEXTableInfo *\fIinfo_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fItable_type\fP 1i +The type of lookup table (see the Description). +.IP \fIinfo_return\fP 1i +Returns the lookup table information. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns information about the specified type of +lookup table. +The type of lookup table must be one of the following: +.ID +.PN PEXLUTColorApprox +.PN PEXLUTColor +.PN PEXLUTDepthCue +.PN PEXLUTEdgeBundle +.PN PEXLUTInteriorBundle +.PN PEXLUTLight +.PN PEXLUTLineBundle +.PN PEXLUTMarkerBundle +.PN PEXLUTPattern +.PN PEXLUTTextBundle +.PN PEXLUTTextFont +.PN PEXLUTView +.DE +The returned information is based on the assumption that +the lookup table would be used on drawables with the same root +and depth as specified drawable. The returned information includes the +number of predefined table entries, the number of definable table +entries, and the indices of the predefined minimum and maximum entries. +Predefined entries are contiguous. The number of definable table entries +includes the number of predefined entries since predefined table entries can +be redefined by the application. All entries between the predefined minimum +and maximum values are guaranteed to be defined initially (i.e. predefined +entries have contiguous indices). +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short definable_entries; + unsigned short predefined_count; + unsigned short predefined_min; + unsigned short predefined_max; +} PEXTableInfo; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.IP \fIBadPEXLookupTable\fP 1i +The specified table type is unsupported. +.IP \fIBadValue\fP 1i +The specified table type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable +.RE +.bp +.SH +PEXSetTableEntries - Set Lookup Table Entries +.XS + PEXSetTableEntries +.XE +.IN "PEXSetTableEntries" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetTableEntries\^(\^Display *\fIdisplay\fP\^, PEXLookupTable \fItable\fP\^, unsigned int \fIstart\fP\^, unsigned int \fIcount\fP\^, int \fItable_type\fP\^, PEXPointer \fIentries\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fItable\fP 1i +The resource identifier of the lookup table. +.IP \fIstart\fP 1i +The index of the first table entry to be set. +.IP \fIcount\fP 1i +The number of table entries to be set. +.IP \fItype\fP 1i +The type of lookup table entries to be set (see the Description). +.IP \fIentries\fP 1i +An array of table entries. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets lookup table entries in the specified lookup table, +starting at the specified entry index. +.LP +The entries must point to an array of structures having one of the +following types: +.RS +.PN PEXTextFontEntry +if type is +.PN PEXLUTTextFont +.br +.PN PEXViewEntry +if type is +.PN PEXLUTView +.br +.PN PEXColorApproxEntry +if type is +.PN PEXLUTColorApprox +.br +.PN PEXLineBundleEntry +if type is +.PN PEXLUTLineBundle +.br +.PN PEXMarkerBundleEntry +if type is +.PN PEXLUTMarkerBundle +.br +.PN PEXTextBundleEntry +if type is +.PN PEXLUTTextBundle +.br +.PN PEXInteriorBundleEntry +if type is +.PN PEXLUTInteriorBundle +.br +.PN PEXEdgeBundleEntry +if type is +.PN PEXLUTEdgeBundle +.br +.PN PEXLightEntry +if type is +.PN PEXLUTLight +.br +.PN PEXDepthCueEntry +if type is +.PN PEXLUTDepthCue +.br +.PN PEXColorEntry +if type is +.PN PEXLUTColor +.br +.PN PEXPatternEntry +if type is +.PN PEXLUTPattern +.RE +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXLookupTable; +.sp +#if NeedFunctionPrototypes +typedef void *PEXPointer; +#else +typedef char *PEXPointer; +#endif +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadPEXColorType\fP 1i +The specified color type is invalid or unsupported. +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid, or the table type is unsupported. +.IP \fIBadValue\fP 1i +The sum of start plus count is too large, a table entry field contains an +invalid value, or index 0 is invalid for the specified table type. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateLookupTable , +.PN PEXGetTableInfo , +.PN PEXGetPredefinedEntries , +.br +.PN PEXGetDefinedIndices , +.PN PEXGetTableEntry , +.PN PEXGetTableEntries +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter04 b/xc/doc/specs/PEX5/PEXlib/chapter04 new file mode 100644 index 000000000..0c0dac480 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter04 @@ -0,0 +1,2026 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 4\fP\s-1 + +\s+1\fBPipeline Contexts\fP\s-1 +.sp 2 +.nr H1 4 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 4: Pipeline Contexts +.XE +.LP +A pipeline context is a PEX resource containing an instance of the +.IN "Pipeline context" +.IN "Attributes" +attributes which describe a rendering pipeline. The attributes +in a pipeline context are used to initialize the renderer resource's pipeline +state whenever a +.PN PEXBeginPickAll , +.PN PEXBeginPickOne , +.PN PEXBeginRendering , +.PN PEXPickAll , +.PN PEXPickOne +or +.PN PEXRenderNetwork +function is called. The pipeline context section +describes pipeline context attributes and the operations that +can be performed on pipeline context resources. +.LP +Some of the attributes in a pipeline context are references to other resources. +If a resource identifier is used in creating another resource, but then that +first resource is freed, the value +.PN PEXAlreadyFreed +is returned as the resource identifier of the first resource when the later +resource is queried. +.LP +The following sections describe the attributes of a +pipeline context and how attributes affect the operation of the rendering +pipeline. +.LP +In addition to the descriptions of attributes given here, see also +\fIChapter 2: Output Commands\fP. +.NH 2 +Marker Attributes +.XS +\*(SN Marker Attributes +.XE +.LP +The attributes described in this section control the appearance of marker +primitives. +.LP +.sp +.IN marker type +The marker type attribute +specifies the marker type (glyph) to use when drawing marker primitives. +The supported marker types are inquirable via +.PN PEXGetEnumTypeInfo . +The +.PN PEXMarkerDot +type displays the smallest displayable dot at the marker +position. The marker scale factor is ignored for +.PN PEXMarkerDot . +The +.PN PEXMarkerCross +type displays a cross or plus sign with the intersection at the +marker position. +The +.PN PEXMarkerAsterisk +type displays a star or asterisk with the +center at the marker position. +The +.PN PEXMarkerCircle +type displays a circle with +the center at the marker position. +The +.PN PEXMarkerX +type displays an "x" or +diagonal cross with the intersection at the marker position. +.LP +The default marker type is +.PN PEXMarkerAsterisk . +.LP +.sp +.IN marker scale +The marker scale attribute +contains the marker scale factor to use when drawing marker +primitives. It is multiplied by the nominal marker size (see +.PN PEXGetImpDepConstants ) +to determine the actual size of +the marker to be drawn. +.LP +The default marker scale is 1.0. +.LP +.sp +.IN marker color +.IN color marker +The marker color attribute +contains the color value to use when drawing marker primitives. +.LP +The default marker color has color type +.PN PEXColorTypeIndexed +and a color value of one. +.LP +.sp +.IN marker bundle +.IN bundle marker +The marker bundle index attribute +contains the lookup table index used to obtain bundled marker +attributes from the marker bundle table. +.LP +The default marker bundle index is one. +.NH 2 +Text Attributes +.XS +\*(SN Text Attributes +.XE +.LP +The attributes described in this section control the +appearance of text and annotation text primitives. Text and annotation +text primitives share the text font index, text precision, character +expansion, character spacing, text color, and text bundle index attributes. +Text and annotation text primitives use separate path, alignment, height, +and up vector attributes. +.LP +.sp +.IN text "font index" +The text font index attribute +contains the lookup table index used to +obtain the font identification for drawing text +and annotation text primitives. +.LP +The default text font index is one. +.LP +.sp +.IN text precision +The text precision attribute +contains the text precision to use when drawing text +and annotation text primitives. The possible values are +.PN PEXStrokePrecision , +.PN PEXCharPrecision +and +.PN PEXStringPrecision . +For +.PN PEXStrokePrecision +precision, clipping and transformation occurs on every stroke +that defines a character glyph. +For +.PN PEXCharPrecision +precision, clipping and transformation occurs on at least a +character-by-character basis. +A text string in +.PN PEXStringPrecision +precision is treated as a single entity that +is transformed and clipped. +.LP +The default text precision is +.PN PEXStringPrecision . +.LP +.sp +.IN "character expansion" +.IN text "character expansion" +The character expansion attribute +specifies the deviation of the width to height +ratio of the characters from the ratio indicated by the +font designer. +.LP +The default character expansion is 1.0. +.LP +.sp +.IN "character spacing" +.IN text "character spacing" +The character spacing attribute +specifies how much additional space is to be inserted between +two adjacent character bodies and is specified as a fraction of the +font-nominal character height. +.LP +The default character spacing is 0.0. +.LP +.sp +.IN text color +.IN color text +The text color attribute +contains the color value to use when drawing text primitives. +.LP +The default text color has color type +.PN PEXColorTypeIndexed +and a color value of one. +.LP +.sp +.IN "character height" +.IN text "character height" +The character height attribute +contains the character height to use when drawing text primitives. +The character height +is specified in modeling coordinates. +.LP +The default character height is 0.01. +.LP +.sp +.IN "character up vector" +.IN text "character up vector" +The character up vector attribute +contains the character up vector +to use when drawing text primitives. +The up vector +is specified in the text local coordinate system defined by the direction +vectors specified with the text primitive. +.LP +The default character up vector is <0.0, 1.0>. +.LP +.sp +.IN text path +The text path attribute +contains the text path to use when drawing text primitives +(i.e., the writing path of the text string). Possible values for text +path are +.PN PEXPathLeft +(text path is to the left), +.PN PEXPathRight +(text +path is to the right), +.PN PEXPathUp +(text path is up), and +.PN PEXPathDown +(text path is +down). +.LP +The default text path is +.PN PEXPathRight . +.LP +.sp +.IN text alignment +The text alignment attribute +contains the horizontal and vertical alignment +to use when drawing text primitives. The possible values for +horizontal alignment are +.PN PEXHAlignNormal , +.PN PEXHAlignLeft , +.PN PEXHAlignRight , +and +.PN PEXHAlignCenter . +If horizontal alignment is +.PN PEXHAlignNormal , +text string alignment is "normal" with +respect to the current text path. +A text string with +.PN PEXHAlignLeft +horizontal alignment is left-justified, +a text string with +.PN PEXHAlignRight +horizontal alignment is right-justified, +and a text string with +.PN PEXHAlignCenter +horizontal alignment is center-justified. +The possible values for vertical alignment are +.PN PEXVAlignNormal , +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase , +and +.PN PEXVAlignBottom . +If vertical alignment is +.PN PEXVAlignNormal , +text string alignment is "normal" with +respect to the current text path. +Text strings with +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase +and +.PN PEXVAlignBottom +vertical alignment +are aligned with the character top line, cap line, half line, base line and +bottom line, respectively. +.LP +The default text horizontal alignment is +.PN PEXHAlignNormal +and the +default text vertical alignment is +.PN PEXVAlignNormal . +.LP +.sp +.IN "character height" "annotation" +.IN "annotation text" "character height" +.IN "text" "annotation character height" +The annotation text height attribute +has the same meaning for annotation text +primitives as the text height attribute has for text primitives. +.LP +The default annotation text height is 0.01. +.LP +.sp +.IN "character up vector" "annotation" +.IN "annotation text" "character up vector" +.IN "text" "annotation up vector" +The annotation text up vector attribute +has the same meaning for annotation text +primitives as the text up vector attribute has for text primitives. +.LP +The default annotation text up vector is <0.0, 1.0>. +.LP +.sp +.IN "annotation text" "path" +.IN "text path" "annotation" +The annotation text path attribute +has the same meaning for annotation text +primitives as the text path attribute has for text primitives. +.LP +The default annotation text path is +.PN PEXPathRight . +.LP +.sp +.IN "annotation text" "alignment" +.IN "text alignment" "annotation" +The annotation text alignment attribute +has the same meaning for annotation text +primitives as the text alignment attribute has for text primitives. +.LP +The default annotation text horizontal alignment is +.PN PEXHAlignNormal +and the +default annotation text vertical alignment is +.PN PEXVAlignNormal . +.LP +.sp +.IN "annotation text" "style" +The annotation text style attribute +specifies the style to use when drawing annotation text primitives. +Supported annotation text styles are inquirable via +.PN PEXGetEnumTypeInfo . +If the style is +.PN PEXATextConnected +a line is drawn, using the current line +attributes, from the annotation text reference point to the annotation text +string. +If the style is +.PN PEXATextNotConnected , +no connecting line is drawn. +.LP +The default annotation text style is +.PN PEXATextNotConnected . +.LP +.sp +.IN "text" "bundle index" +.IN "bundle" "text" +The text bundle index attribute +contains the lookup table index +used to obtain bundled text attributes from the text bundle table. +.LP +The default text bundle index is one. +.NH 2 +Line and Curve Attributes +.XS +\*(SN Line and Curve Attributes +.XE +.LP +.IN attributes polyline +.IN attributes "B-spline curves" +The attributes in this section control the appearance of polylines, +non-uniform rational B-spline curves. +Also, when the annotation text style is +.PN PEXATextConnected , +the +connection lines are drawn using the current set of line and curve attributes. +.LP +.sp +.IN "line" "type" +The line type attribute +specifies the style to use when drawing line or curve primitives. +Supported line types are inquirable via +.PN PEXGetEnumTypeInfo . +A line drawn with a line type of +.PN PEXLineTypeSolid +is drawn as a solid, unbroken +line. A line of type +.PN PEXLineTypeDashed +is drawn using dashed lines. A line of +type +.PN PEXLineTypeDotted +is drawn using dotted lines. A line of type +.PN PEXLineTypeDashDot +is drawn with alternating dots and dashes. +.LP +The default line type is +.PN PEXLineTypeSolid . +.LP +.sp +.IN line width +The line width attribute +is the scale factor applied to the nominal width of the polyline or curve +primitive to +be rendered. Line width is applied in 2D device coordinates after the +primitive has been transformed from 3D space to 2D device space. It is +multiplied by the nominal line width (see +.PN PEXGetImpDepConstants ) +to +determine the actual width of the line or curve to be drawn. +.LP +The default line width scale factor is 1.0. +.LP +.sp +.IN line color +.IN color line +The line color attribute +contains the color value to use when drawing line +or curve primitives. +.LP +The default line color has color type +.PN PEXColorTypeIndexed +and a color value of one. +.LP +.sp +.IN "curve approximation" +.IN "B-spline" "curve approximation" +The curve approximation attribute +affects only non-uniform rational B-spline curves. +Supported curve approximation methods are inquirable via +.PN PEXGetEnumTypeInfo . +If the curve approximation method is +.PN PEXApproxImpDep , +an implementation-dependent method is used to approximate the curve. +The tolerance value is not used for this method. +If the method is +.PN PEXApproxConstantBetweenKnots , +the curve is +tessellated with equal parametric increments between successive pairs of knots. +When the curve includes knots and the tolerance is negative, the curve is +evaluated at just the parametric bounds, plus all knots which are between the +parametric bounds. If the tolerance is positive, the curve is evaluated at +the number of points between the knots, but only if these parametric values are +between the parametric bounds. +If the method is +.PN PEXApproxWCChordalSize , +the curve +is tessellated until the length of every line segment, in world coordinates, is +less than the tolerance. If the method is +.PN PEXApproxNPCChordalSize , +the curve is +tessellated until the length of every line segment, in normalized projection +coordinates, is less than the tolerance. +If the method is +.PN PEXApproxDCChordalSize , +the curve is +tessellated until the length of every line segment, in device +coordinates, is less than the tolerance. If the method is +.PN PEXCurveApproxWCChordalDev , +the curve is tessellated until the maximum +deviation, in world coordinates, between the line and the curve is less than +the tolerance. If the method is +.PN PEXCurveApproxNPCChordalDev , +the curve is +tessellated until the maximum deviation, in normalized projection coordinates, +between the line and the curve is less than the tolerance. +If the method is +.PN PEXCurveApproxDCChordalDev , +the curve is +tessellated until the maximum deviation, in device coordinates, +between the line and the curve is less than the tolerance. +If the method is +.PN PEXApproxWCRelative , +the tolerance value must be between 0 and 1. +The tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in world coordinates. +Values closer to 1 specify a better relative quality. +If the method is +.PN PEXApproxNPCRelative , +the tolerance value must be between 0 and 1. +The tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in normalized projection coordinates. +Values closer to 1 specify a better relative quality. +If the method is +.PN PEXApproxDCRelative , +the tolerance value must be between 0 and 1. +The tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in device coordinates. +Values closer to 1 specify a better relative quality. +.LP +The default curve +approximation method is +.PN PEXApproxImpDep . +.LP +.sp +.IN "line" "interpolation" +.IN "polyline" "interpolation" +.IN "B-spline" "polyline interpolation" +The polyline interpolation attribute +does not affect non-uniform rational B-spline curves. +Supported polyline interpolation methods are inquirable via +.PN PEXGetEnumTypeInfo . +If the method is +.PN PEXPolylineInterpNone , +color values are not interpolated between +vertices, when they are provided. If colors are specified at the vertices of a +polyline set primitive, the color of the ith vertex is used when drawing the +line segment between the ith and i+1th vertices. +If the method is +.PN PEXPolylineInterpColor , +color values are +interpolated along the line segment for pixels between the vertices. +.LP +The default polyline interpolation method is +.PN PEXPolylineInterpNone . +.LP +.sp +.IN "line" "bundle index" +.IN "polyline" "bundle index" +.IN "bundle" "line" +The line bundle index attribute +contains the lookup table index used +to obtain bundled line and curve attributes from the line +bundle table. +.LP +The default line bundle index is one. +.NH 2 +Surface Attributes +.XS +\*(SN Surface Attributes +.XE +.LP +.IN "surface" "attributes" +.IN "attributes" "surface" +This section describes attributes that affect the appearance of +area-defining (surface) primitives. The list of surface primitives +includes fill areas, fill area sets, triangle strips, quadrilateral meshes, +non-uniform rational B-spline surfaces and SOFAS (Set Of Fill Area Sets). +.LP +.sp +.IN "surface" "interior style" +.IN "interior style" +.IN "surface" "facing" +The surface interior style attribute +defines the interior style used when +drawing front-facing surfaces. This attribute will also be used as +the interior style for back-facing surfaces if the surface distinguish +attribute is +.PN False . +Supported surface interior styles are inquirable via +.PN PEXGetEnumTypeInfo . +If the surface interior style is +.PN PEXInteriorStyleHollow , +only the boundary is drawn. +If the interior style is +.PN PEXInteriorStyleSolid , +the surface interior is filled. +If the interior style is +.PN PEXInteriorStylePattern , +the surface interior is filled with the +currently selected pattern, oriented according to the current pattern size, +pattern reference point, and pattern reference vectors. +If the interior style is +.PN PEXInteriorStyleHatch , +the surface interior is filled with the currently +selected hatch style. If +the interior style is +.PN PEXInteriorStyleEmpty , +the surface interior is not drawn +at all. +.LP +The default interior style is +.PN PEXInteriorStyleHollow . +.LP +.sp +.IN "surface" "interior style index" +.IN "interior style index" +If the current surface interior style is +.PN PEXInteriorStylePattern , +the surface interior style index attribute +selects which pattern will +be used to render fill areas. If the current surface interior style is +.PN PEXInteriorStyleHatch , +this index selects which hatch style will +be used to render fill areas. This attribute is not used with other +interior styles. +.LP +The default interior style index is one. +.LP +.sp +.IN "surface" "color" +.IN "color" "surface" +The surface color attribute +contains the color value to use when drawing surfaces +(provided the primitive does not have facet or vertex colors which override the +surface color) that are front-facing with respect to the viewing position. It +will also be used as the color for back-facing surfaces if the surface +distinguish attribute is +.PN False . +.LP +The default front-facing surface color has color type +.PN PEXColorTypeIndexed +and a color value of one. +.LP +.sp +.IN "surface" "reflection" +The surface reflection attributes +are used during the reflectance calculation stage +of the rendering pipeline. +These attributes will also be used as the surface reflection attributes +for back-facing +primitives if the surface distinguish attribute is +.PN False . +The specular color attribute provides an additional coefficient per primary for +use in the specular reflection computation. This allows highlights to be +computed that are some color other than that of the light source. The specular +concentration defines the sharpness of the specular highlights or the +"shininess" of the surface. This value is typically used as the exponent in +the specular reflection term of lighting equations and it ranges from zero to +the maximum floating point value. If the specular concentration is zero, +specular highlights are very broad. If the specular concentration is much +larger than zero, the highlights are very small and sharp, as if the surface +was very shiny. The transmission coefficient indicates the amount of light +that passes through a surface. A transmission coefficient of zero indicates +the surface is opaque (lets no light through); a transmission coefficient +of 1.0 indicates the surface is totally invisible (lets all light through). +.LP +The default surface reflection attributes are: ambient coefficient = 1.0, +diffuse coefficient = 1.0, specular coefficient = 1.0, specular +concentration = 0.0, transmission coefficient = 0.0, specular color +type = +.PN PEXColorTypeIndexed +and color value of one. +.LP +.sp +.IN "surface" "reflection model" +The surface reflection model attribute +defines the method to use in approximating +the effect of light reflecting from surface primitives. +This attribute will also be used for back-facing primitives if the surface +distinguishing attribute is +.PN False . +Supported surface reflection models are inquirable via +.PN PEXGetEnumTypeInfo . +If the surface reflection model is +.PN PEXReflectionNone , +no reflectance calculation is performed and the surface color is not +affected by lighting. If the reflection model is +.PN PEXReflectionAmbient , +only the ambient terms of the lighting equation are used. +The shaded color will be the object's base color as seen under ambient light. +If the reflection model is +.PN PEXReflectionDiffuse , +only the ambient and diffuse +terms of the lighting equation are used. The shaded color will be the base +color as seen under ambient light, plus a diffuse reflection component from +each light source. If the reflection model is +.PN PEXReflectionSpecular , +the +ambient, diffuse, and specular terms of the lighting equation are all used +during the reflectance calculation. The shaded color will be the same +as for +.PN PEXReflectionDiffuse , +plus a specular reflection component from each +light source. +.LP +The default surface reflection model is +.PN PEXReflectionNone . +.LP +.sp +.IN "surface" "interpolation" +The surface interpolation attribute +specifies the method used +to compute color values in surface interiors when rendering surface primitives. +This attribute will also be used for back-facing primitives if the surface +distinguish attribute is +.PN False . +Supported surface interpolation methods are inquirable via +.PN PEXGetEnumTypeInfo . +If the surface interpolation method is +.PN PEXSurfaceInterpNone , +the color resulting +from a single reflectance calculation is used for the entire surface. No +interpolation will be performed across surface interiors or edges. This +surface interpolation method is also known as "flat-shading." If the method is +.PN PEXSurfaceInterpColor , +the colors are computed at the vertices of the surface +according to the current reflection model. These color values are then +linearly interpolated across the interior of the surface or the edges. +If the method is +.PN PEXSurfaceInterpDotProduct , +the lighting equation dot products are +computed at the vertices. These dot products are linearly interpolated and +shading is applied using these values to compute the +color value at each pixel in the interior of a surface or along a surface edge. +If the method is +.PN PEXSurfaceInterpNormal , +the reflectance calculation is performed at each pixel in the surface +interior or along a surface edge using the interpolated normal. +.LP +The default surface interpolation method is +.PN PEXSurfaceInterpNone . +.LP +.sp +.IN "interior style" "back-face" +.IN "back-face" "interior style" +If the distinguish attribute is +.PN True , +the back-face interior style attribute +is used to render surfaces that are back-facing with +respect to the viewing position. +.LP +The default back-face interior style is +.PN PEXInteriorStyleHollow . +.LP +.sp +If the distinguish attribute is +.PN True , +the back-face interior style index attribute +is used to choose a pattern or hatch style with which +back-facing surfaces are rendered, if the back-face interior style is +.PN PEXInteriorStylePattern +or +.PN PEXInteriorStyleHatch , +respectively. +This attribute is not used with other back-face interior styles. +.LP +The default back-face interior style index is one. +.LP +.sp +.IN "back-face" "color" +.IN "color" "back-face" +.IN "surface" "back-face color" +If the distinguish attribute is +.PN True , +the back-face surface color attribute +is used to render surfaces that are back-facing with respect to the viewing +position. +.LP +The default back-facing surface color has color type +.PN PEXColorTypeIndexed +and a +color value of one. +.LP +.sp +.IN "surface" "back-face reflection" +.IN "back-face" "reflection" +If the distinguish attribute is +.PN True , +the back-face surface reflection attributes +are used instead of the reflection attributes to render surfaces +that are back-facing with respect to the viewing position. +.LP +The default back-face surface reflection attributes are: ambient +coefficient = 1.0, diffuse coefficient = 1.0, specular coefficient = 1.0, +specular concentration = 0.0, transmission coefficient = 0.0, specular color +type = +.PN PEXColorTypeIndexed +and color value of one. +.LP +.sp +If the distinguish attribute is +.PN True , +the back-face surface reflection model attribute +is used instead of the surface reflection model attribute to render surfaces +that are back-facing with respect to the viewing position. +.LP +The default back-face reflection model is +.PN PEXReflectionNone . +.LP +.sp +.IN "back-face" "interpolation" +.IN "surface" "back-face interpolation" +If the distinguish attribute is +.PN True , +the back-face surface interpolation attribute +is used instead of the surface interpolation attribute to render surfaces +that are back-facing with respect to the viewing position. +.LP +The default back-face surface interpolation method is +.PN PEXSurfaceInterpNone . +.LP +.sp +The surface approximation attribute +only affects non-uniform rational B-spline surfaces. +Supported surface approximation methods are inquirable via +.PN PEXGetEnumTypeInfo . +If the surface approximation method is +.PN PEXApproxImpDep , +an implementation-dependent +method is used to approximate surfaces in the u and v parameter dimensions. +The tolerance values are not used for this method. +For a method of +.PN PEXApproxConstantBetweenKnots , +the surface is tessellated with +equal parametric increments between successive pairs of knots. When the +surface includes knots and the tolerance is negative, the surface is +evaluated at just the parametric bounds, plus all knots which are between the +parametric bounds. If the tolerance is positive, the surface is +evaluated at the number of points between the knots, but only if these +parametric values are between the parametric bounds. +If the method is +.PN PEXApproxWCChordalSize , +the surface is tessellated until +the maximum length chord measured in world coordinates for both u and v +parameter directions is less than the corresponding tolerance. +If the method is +.PN PEXApproxNPCChordalSize , +the surface is tessellated until +the maximum length chord measured in normalized projection coordinates for +both u and v parameter directions is less than the corresponding tolerance. +If the method is +.PN PEXApproxDCChordalSize , +the surface is tessellated until +the maximum length chord measured in device coordinates for both u and v +parameter directions is less than the corresponding tolerance. +If the method is +.PN PEXSurfaceApproxWCPlanarDev , +the surface is tessellated until +the maximum deviation, in world coordinates, between the plane and the surface +is less than the tolerance. +If the method is +.PN PEXSurfaceApproxNPCPlanarDev , +the surface is tessellated until +the maximum deviation in normalized projection coordinates between the plane +and the surface is less than the tolerance. +If the method is +.PN PEXSurfaceApproxDCPlanarDev , +the surface is tessellated until +the maximum deviation in device coordinates between the plane +and the surface is less than the tolerance. +If the method is +.PN PEXApproxWCRelative , +the u tolerance value must be between 0 and 1. The v tolerance value is not +used for this method. +The u tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in world coordinates. +Values closer to 1 specify a better relative quality. +If the method is +.PN PEXApproxNPCRelative , +the u tolerance value must be between 0 and 1. The v tolerance value is not +used for this method. +The u tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in normalized projection coordinates. +Values closer to 1 specify a better relative quality. +If the method is +.PN PEXApproxDCRelative , +the u tolerance value must be between 0 and 1. The v tolerance value is not +used for this method. +The u tolerance specifies an approximation value which +indicates a relative quality of rendering to be maintained independent of +scaling in device coordinates. +Values closer to 1 specify a better relative quality. +.LP +The default surface approximation method is +.PN PEXApproxImpDep . +.LP +.sp +If the culling mode attribute is +.PN PEXBackFaces , +all back-facing surfaces will be culled and +only front-facing surfaces will be rendered. If the culling mode is +.PN PEXFrontFaces , +all front-facing surfaces will be culled and only back-facing +surfaces will be rendered. If the culling mode is +.PN PEXNone , +both +front- and back-facing fill areas will be rendered. +.LP +The default culling mode is +.PN PEXNone . +.LP +.sp +The facet distinguishing flag attribute +selects whether back-facing surfaces are rendered with the back-face +surface attributes or the front-face surface attributes. +If distinguish is +.PN True , +then back-face attributes are used to render the surface. +If distinguish is +.PN False , +then front-face attributes are used to render the surface. +.LP +The default face distinguish flag is +.PN False . +.LP +.sp +The pattern size attribute +determines the scaling of the pattern used to render fill areas when the +interior style or back-facing interior style attribute is +.PN PEXInteriorStylePattern . +The value <width 0.0> will be used +as the pattern width vector, and the value <0.0 height> will be used as the +pattern height vector. +.LP +The default pattern size is <1.0, 1.0>. +.LP +.sp +The pattern reference point attribute +determines the position, in model coordinates, of +one corner of the pattern box used to render fill areas when the interior +style or back-facing interior style attribute is +.PN PEXInteriorStylePattern . +.LP +The default pattern reference point is <0.0, 0.0, 0.0>. +.LP +.sp +The pattern reference vector 1 attribute +determines the direction, in model coordinates, onto +which a pattern's width will be mapped, when the interior style or the +back-facing interior style attribute is +.PN PEXInteriorStylePattern . +.LP +The default pattern reference vector 1 is <1.0, 0.0, 0.0>. +.LP +.sp +The pattern reference vector 2 attribute +determines the direction, in model coordinates, onto +which a pattern's height will be mapped, when the interior style or the +back-facing interior style attribute is +.PN PEXInteriorStylePattern . +.LP +The default pattern reference vector 2 is <0.0, 1.0, 0.0>. +.LP +.sp +.IN "surface" "interior bundle index" +.IN "bundle" "surface" +The interior bundle index attribute +contains the lookup table index +used to obtain bundled surface attributes from the interior bundle +table. +.LP +The default interior bundle index is one. +.LP +.sp +The parametric surface characteristics attribute +controls the surface characteristics of non-uniform B-spline surfaces. +The supported parametric surface characteristics are obtained by calling +.PN PEXGetEnumTypeInfo . +.LP +The default parametric surface characteristics type is +.PN PEXPSCNone . +.NH 2 +Surface Edge Attributes +.XS +\*(SN Surface Edge Attributes +.XE +.LP +.IN "surface" "edges" +.IN "edges" +If the surface edges flag is +.PN PEXOn , +surface edges +are drawn. If it is +.PN PEXOff , +surface edges are not drawn. +.LP +The default surface edges flag is +.PN PEXOff . +.LP +.sp +.IN "surface" "edge type" +.IN "edge type" +The surface edge type attribute +specifies the style to use when drawing edges of surface primitives. +Supported surface edge types are inquirable via +.PN PEXGetEnumTypeInfo . +If the edge type is +.PN PEXSurfaceEdgeSolid , +edges are drawn as solid, unbroken +lines. +If the edge type is +.PN PEXSurfaceEdgeDashed , +edges are drawn using dashed lines. +If the edge type is +.PN PEXSurfaceEdgeDotted , +edges are drawn using dotted lines. +If the edge type is +.PN PEXSurfaceEdgeDashDot , +edges are drawn using alternating +dots and dashes. +.LP +The default surface edge type is +.PN PEXSurfaceEdgeSolid . +.LP +.sp +.IN "surface" "edge width" +.IN "edge width" +The surface edge width attribute +is the scale factor applied to the nominal width of the surface edges +when they are rendered. Edge width is applied in 2D device +coordinates after the edge has been transformed from 3D +space to 2D device space. It is multiplied by the nominal edge width (see +.PN PEXGetImpDepConstants ) +to determine the actual width of +the surface edge to be drawn. +.LP +The default surface edge width scale factor is 1.0. +.LP +.sp +The surface edge color attribute +contains the color value used +when drawing edges of surface primitives. +.LP +The default surface edge color has color type +.PN PEXColorTypeIndexed +and a color value of one. +.LP +.sp +.IN "surface" "edge bundle index" +.IN "edge bundle index" +The edge bundle index attribute +contains the lookup table index +used to obtain bundled surface edge attributes from the edge bundle +table. +.LP +The default edge bundle index is one. +.NH 2 +Geometry Transformation Attributes +.XS +\*(SN Geometry Transformation Attributes +.XE +.LP +.IN "transformations" +.IN "local transformation matrix" +.IN "transformation" "local" +The local transformation matrix attribute +contains the local modeling transformation matrix used +when drawing output primitives. +.LP +The default local transformation matrix is the identity matrix. +.LP +.sp +.IN "transformation" "global" +.IN "global transformation matrix" +The global transformation matrix attribute +contains the global modeling transformation matrix used +when drawing output primitives. The current local modeling matrix and +the current global modeling matrix are concatenated to form the composite +modeling transformation matrix. The composite modeling transformation matrix +is used to transform geometry in modeling coordinates into world coordinates. +.LP +The default global transformation matrix is the identity matrix. +.LP +.sp +.IN "modeling clipping" +.IN "clipping" "modeling" +The modeling clipping flag attribute +determines whether output primitives are +clipped against the modeling clipping volume. +.LP +The default model clipping flag is +.PN PEXNoClip . +.LP +.sp +.IN "modeling clipping" "clip volume" +.IN "clipping" "volume" +The model clip volume attribute +specifies the volume to which +output primitives will be clipped, if the modeling clipping flag is +.PN True . +.LP +The default model clipping volume is +an empty list (i.e. no half-spaces specified). +.LP +.sp +.IN "view index" +The view index attribute +contains the lookup table index used to obtain viewing attributes +from the view table. The view table contains the attribute that defines the +view mapping transformation to be used (mapping), the attribute that defines +the view orientation (projection) transformation to be used, and the attribute +containing the min/max values of the clipping volume (clip limits). The view +table also contains a mask (clip flags) indicating whether clipping should +be performed at the front, back, and sides of the clipping volume. +.LP +The default view index is zero. +.NH 2 +Color Transformation Attributes +.XS +\*(SN Color Transformation Attributes +.XE +.LP +.IN "light source" +The light source state attribute specifies which lights are enabled. +The supported types of lights are obtained by calling +.PN PEXGetEnumTypeInfo . +The maximum number of simultaneously active non-ambient lights are +queried by calling +.PN PEXGetImpDepConstants . +The size of the light table is obtained by calling +.PN PEXGetTableInfo . +.LP +The default light state is an empty list (all lights are disabled). +.LP +.sp +.IN "depth-cue" +The depth-cue index attribute determines the depth-cue lookup table entry +used to determine depth-cueing parameters. +.LP +The default depth-cue index is zero. +.LP +.sp +.IN "color approximation" +The color approximation index attribute +determines the color approximation lookup table entry used +for mapping rendering color to device color. +.LP +The default color approximation index is zero. +.LP +.sp +The rendering color model attribute +controls which color +model is used for lighting, shading and depth-cueing computations. +Supported rendering color models are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +The default rendering color model is +.PN PEXRenderingColorModelImpDep . +.NH 2 +Aspect Source Flags +.XS +\*(SN Aspect Source Flags +.XE +.LP +.IN "aspect source flag" +.IN "ASF" +The bits in the aspect source flag (ASF) values bitmask contain an ASF value +for each attribute obtained from a lookup (bundle) table. If the value is +.PN PEXIndividual +during rendering, the value for the corresponding attribute +is obtained directly from the current rendering pipeline state. If the value +for the ASF is +.PN PEXBundled , +the value for the attribute is obtained from the +appropriate bundle lookup table. The default value for all ASF +values is +.PN PEXIndividual . +.LP +A bitmask of ASF enables is also used when setting the ASF values. For each +bit in the enables bitmask which is set to one, the corresponding value is +taken from the ASF values bitmask and set in the pipeline context. +The individual bits in both the ASF values and ASF enables bitmasks are +referenced using the following constants: +.ID +.PN PEXASFMarkerType +.PN PEXASFMarkerScale +.PN PEXASFMarkerColor +.PN PEXASFTextFontIndex +.PN PEXASFTextPrec +.PN PEXASFCharExpansion +.PN PEXASFCharSpacing +.PN PEXASFTextColor +.PN PEXASFLineType +.PN PEXASFLineWidth +.PN PEXASFLineColor +.PN PEXASFCurveApprox +.PN PEXASFPolylineInterp +.PN PEXASFInteriorStyle +.PN PEXASFInteriorStyleIndex +.PN PEXASFSurfaceColor +.PN PEXASFSurfaceInterp +.PN PEXASFReflectionModel +.PN PEXASFReflectionAttr +.PN PEXASFBFInteriorStyle +.PN PEXASFBFInteriorStyleIndex +.PN PEXASFBFSurfaceColor +.PN PEXASFBFSurfaceInterp +.PN PEXASFBFReflectionModel +.PN PEXASFBFReflectionAttr +.PN PEXASFSurfaceApprox +.PN PEXASFSurfaceEdges +.PN PEXASFSurfaceEdgeType +.PN PEXASFSurfaceEdgeWidth +.PN PEXASFSurfaceEdgeColor +.DE +.NH 2 +Miscellaneous Attributes +.XS +\*(SN Miscellaneous Attributes +.XE +.LP +.IN "pick" "identifier" +The pick identifier attribute +contains the pick id used with picking +operations. The pick identification is set to values which make it +convenient for applications to identify the picked primitive(s). +.LP +The default pick identification is zero. +.LP +.sp +The HLHSR (hidden-line, hidden-surface removal) identifier attribute +has no meaning for any standard HLHSR mode except +.PN PEXHLHSRZBufferID , +where it enables or disables HLHSR. +When the renderer's HLHSR mode is set to +.PN PEXHLHSRZBufferID , +a value of +.PN PEXHLHSRIDDisable +for the HLHSR identifier will disable z-buffering and a value of +.PN PEXHLHSRIDEnable +will enable z-buffering. For non-standard HLHSR modes (returned by +.PN PEXGetEnumTypeInfo ), +the meaning of HLHSR identifier is implementation-dependent. +.LP +The default HLHSR identifier is zero. If an application wanted to have the +renderer automatically z-buffer when the HLHSR mode was set to +.PN PEXHLHSRZBufferID , +the application could change the pipeline context HLHSR identifier attribute +to +.PN PEXHLHSRIDEnable . +This would then alleviate the need for an +.PN PEXSetHLHSRID +attribute call after every +.PN PEXBeginRendering +when using immediate mode rendering. +.LP +.sp +.IN "name set" +The name set attribute contains a reference to a name set resource. +The contents of the specified name set are used to initialize a +rendering pipeline's name set attribute. +The contents of the rendering pipeline's name set is then +modified using the +.PN PEXAddToNameSet +and +.PN PEXRemoveFromNameSet +output +commands. +.LP +The default name set is the empty set. +.NH 2 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.ID +.Co +/* pipeline context attributes */ +.sp +typedef struct { + PEXEnumTypeIndex marker_type; /* PEXMarkerDot, PEXMarkerCross, */ + /* PEXMarkerAsterisk, PEXMarkerCircle, PEXMarkerX */ + float marker_scale; + PEXColorSpecifier marker_color; + PEXTableIndex marker_bundle_index; + PEXTableIndex text_font; + unsigned short text_precision; /* PEXStringPrecision, PEXCharPrecision, PEXStrokePrecision */ + float char_expansion; + float char_spacing; + PEXColorSpecifier text_color; + float char_height; + PEXVector2D char_up_vector; + unsigned short text_path; /* PEXPathRight, PEXPathLeft, PEXPathUp, PEXPathDown */ + PEXTextAlignment text_alignment; + float atext_height; + PEXVector2D atext_up_vector; + unsigned short atext_path; /* PEXPathRight, PEXPathLeft, PEXPathUp, PEXPathDown */ + PEXTextAlignment atext_alignment; + PEXEnumTypeIndex atext_style; /* PEXATextNotConnected, PEXATextConnected */ + PEXTableIndex text_bundle_index; + PEXEnumTypeIndex line_type; /* PEXLineTypeSolid, PEXLineTypeDashed, */ + /* PEXLineTypeDotted, PEXLineTypeDashDot */ + float line_width; + PEXColorSpecifier line_color; + PEXCurveApprox curve_approx; + PEXEnumTypeIndex polyline_interp; /* PEXPolylineInterpNone, PEXPolylineInterpColor */ + PEXTableIndex line_bundle_index; + PEXEnumTypeIndex interior_style; /* PEXInteriorStyleHollow, PEXInteriorStyleSolid, */ + /* PEXInteriorStylePattern, PEXInteriorStyleHatch, */ + /* PEXInteriorStyleEmpty */ + PEXTypeOrTableIndex interior_style_index; + PEXColorSpecifier surface_color; + PEXReflectionAttributes reflection_attr; + PEXEnumTypeIndex reflection_model; /* PEXReflectionNone, PEXReflectionAmbient, */ + /* PEXReflectionDiffuse, PEXReflectionSpecular */ + PEXEnumTypeIndex surface_interp; /* PEXSurfaceInterpNone, PEXSurfaceInterpColor, */ + /* PEXSurfaceInterpDotProduct, PEXSurfaceInterpNormal */ + PEXEnumTypeIndex bf_interior_style; /* PEXInteriorStyleHollow, PEXInteriorStyleSolid, */ + /* PEXInteriorStylePattern, PEXInteriorStyleHatch, */ + /* PEXInteriorStyleEmpty */ + PEXTypeOrTableIndex bf_interior_style_index; + PEXColorSpecifier bf_surface_color; + PEXReflectionAttributes bf_reflection_attr; + PEXEnumTypeIndex bf_reflection_model; /* PEXReflectionNone, PEXReflectionAmbient, */ + /* PEXReflectionDiffuse, PEXReflectionSpecular */ + PEXEnumTypeIndex bf_surface_interp; /* PEXSurfaceInterpNone, PEXSurfaceInterpColor, */ + /* PEXSurfaceInterpDotProduct, PEXSurfaceInterpNormal */ + PEXSurfaceApprox surface_approx; + unsigned short culling_mode; /* PEXNone, PEXBackFaces, PEXFrontFaces */ + Bool distinguish; /* True or False */ + PEXCoord2D pattern_size; + PEXCoord pattern_ref_point; + PEXVector pattern_ref_vec1; + PEXVector pattern_ref_vec2; + PEXTableIndex interior_bundle_index; + PEXSwitch surface_edges; /* True or False */ + PEXEnumTypeIndex surface_edge_type; /* PEXSurfaceEdgeSolid, PEXSurfaceEdgeDashed, */ + /* PEXSurfaceEdgeDotted, PEXSurfaceEdgeDashDot */ + float surface_edge_width; + PEXColorSpecifier surface_edge_color; + PEXTableIndex edge_bundle_index; + PEXMatrix local_transform; + PEXMatrix global_transform; + unsigned short model_clip; /* PEXClip, PEXNoClip */ + PEXModelClipVolume model_clip_volume; + PEXTableIndex view_index; + PEXListOfLight light_state; + PEXTableIndex depth_cue_index; + PEXBitmask asf_enables; + PEXBitmask asf_values; + long pick_id; + unsigned long hlhsr_id; /* PEXHLHSRIDDisable, PEXHLHSRIDEnable */ + PEXNameSet name_set; + PEXTableIndex color_approx_index; + PEXEnumTypeIndex rendering_color_model; /* PEXRenderingColorModelImpDep, */ + /* PEXRenderingColorModelRGB, PEXRenderingColorModelCIE, */ + /* PEXRenderingColorModelHSV, PEXRenderingColorModelHLS */ + PEXPSCSpecifier para_surf_char; +} PEXPCAttributes; +.sp +typedef short PEXEnumTypeIndex; +typedef unsigned short PEXTableIndex; +typedef unsigned short PEXTypeOrTableIndex; +typedef unsigned char PEXSwitch; +typedef float PEXMatrix[4][4]; +typedef unsigned long PEXBitmask; +typedef XID PEXNameSet; +.sp +typedef struct { + PEXColorType type; /* PEXColorTypeIndexed, PEXColorTypeRGB, */ + /* PEXColorTypeCIE, PEXColorTypeHSV, */ + /* PEXColorTypeHLS, PEXColorTypeRGB8, */ + /* PEXColorTypeRGB16 */ + unsigned short reserved; + PEXColor value; +} PEXColorSpecifier; +.sp +typedef short PEXColorType; +.sp +typedef union { + PEXColorIndexed indexed; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; +} PEXColor; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.sp +typedef struct { + float x; + float y; + float z; +} PEXVector; +.sp +typedef struct { + float x; + float y; +} PEXVector2D; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.sp +typedef struct { + unsigned short vertical; /* PEXVAlignNormal, PEXVAlignTop, PEXVAlignCap, */ + /* PEXVAlignHalf, PEXVAlignBase, PEXVAlignBottom */ + unsigned short horizontal; /* PEXHAlignNormal, PEXHAlignLeft, */ + /* PEXHAlignCenter, PEXHAlignRight */ +} PEXTextAlignment; +.sp +typedef struct { + PEXEnumTypeIndex method; /* See PEXGetEnumTypeInfo */ + unsigned short reserved; + float tolerance; +} PEXCurveApprox; +.sp +typedef struct { + float ambient; + float diffuse; + float specular; + float specular_conc; + float transmission; + PEXColorSpecifier specular_color; +} PEXReflectionAttributes; +.sp +typedef struct { + PEXEnumTypeIndex method; /* See PEXGetEnumTypeInfo */ + unsigned short reserved; + float u_tolerance; + float v_tolerance; +} PEXSurfaceApprox; +.sp +typedef struct { + unsigned short count; /* number of half spaces */ + PEXHalfSpace *half_spaces; +} PEXModelClipVolume; +.sp +typedef struct { + PEXCoord point; + PEXVector vector; +} PEXHalfSpace; +.sp +typedef struct { + unsigned short count; /* number of lights */ + PEXTableIndex *indices; +} PEXListOfLight; +.sp +typedef struct { + short type; /* PEXPSCNone, PEXPSCImpDep, PEXPSCIsoCurves, */ + /* PEXPSCMCLevelCurves, PEXPSCWCLevelCurves */ + PEXPSCData psc; +} PEXPSCSpecifier; +.sp +typedef union { + PEXPSCIsoparametricCurves iso_curves; + PEXPSCLevelCurves level_curves; + PEXPSCImpDepData imp_dep; +} PEXPSCData; +.sp +typedef struct { + unsigned short placement_type; + unsigned short reserved; + unsigned short u_count; + unsigned short v_count; +} PEXPSCIsoparametricCurves; +.sp +typedef struct { + PEXCoord origin; + PEXVector direction; + unsigned short count; /* number of parameters */ + unsigned short reserved; + float *parameters; +} PEXPSCLevelCurves; +.sp +typedef struct { + unsigned short length; + char *data; +} PEXPSCImpDepData; +.ft P +.DE +.bp +.XS +Function Descriptions +.XE +.SH +PEXChangePipelineContext - Change Pipeline Context +.XS + PEXChangePipelineContext +.XE +.IN "PEXChangePipelineContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXChangePipelineContext\^(\^Display *\fIdisplay\fP\^, PEXPipelineContext \fIcontext\fP\^, unsigned long *\fIvalue_mask\fP\^, PEXPCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the pipeline context. +.IP \fIvalue_mask\fP 1i +A pointer to an array of three unsigned long. +.IP \fIvalues\fP 1i +A pointer to new values for attributes in the pipeline context. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function changes components of the specified pipeline context +to the values specified. The value mask indicates which attribute values are +specified. +.PN PEXSetPCAttributeMask +and +.PN PEXSetPCAttributeMaskAll +can be called to setup the value mask. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPipelineContext; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXColorType\fP 1i +The specified color type is invalid or unsupported. +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPipelineContext\fP 1i +The specified pipeline context resource identifier is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext , +.PN PEXGetPipelineContext , +.PN PEXSetPCAttributeMask +.RE +.bp +.SH +PEXCopyPipelineContext - Copy Pipeline Context +.XS + PEXCopyPipelineContext +.XE +.IN "PEXCopyPipelineContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyPipelineContext\^(\^Display *\fIdisplay\fP\^, unsigned long *\fIvalue_mask\fP\^, PEXPipelineContext \fIsrc_context\fP\^, PEXPipelineContext \fIdst_context\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIvalue_mask\fP 1i +A pointer to an array of three unsigned long. +.IP \fIsrc_context\fP 1i +The resource identifier of the source pipeline. +.IP \fIdst_context\fP 1i +The resource identifier of the destination pipeline context. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies attributes from the source pipeline context +to the destination pipeline context. Both must +already exist as valid pipeline context resources. Only the attributes +indicated by the value mask are copied and +the remainder of the attributes are left as they were. +.PN PEXSetPCAttributeMask +and +.PN PEXSetPCAttributeMaskAll +can be called to setup the value mask. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPipelineContext; +.sp +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPipelineContext\fP 1i +A specified pipeline context resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext , +.PN PEXSetPCAttributeMask +.RE +.bp +.SH +PEXCreatePipelineContext - Create Pipeline Context +.XS + PEXCreatePipelineContext +.XE +.IN "PEXCreatePipelineContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPipelineContext PEXCreatePipelineContext\^(\^Display *\fIdisplay\fP\^, unsigned long *\fIvalue_mask\fP\^, PEXPCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIvalue_mask\fP 1i +A pointer to an array of three unsigned long. +.IP \fIvalues\fP 1i +A pointer to values to override default attribute values in the new pipeline context. +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created pipeline context. +.RE +.SH +Description +.RS +.LP +This function creates a pipeline context and returns its resource identifier. +The value mask indicates the values specified. +Attribute values not specified will be initialized to the default values. +.PN PEXSetPCAttributeMask +and +.PN PEXSetPCAttributeMaskAll +can be called to setup the value mask. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPipelineContext; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadPEXColorType\fP 1i +The specified color type is invalid or unsupported. +.IP \fIBadPEXNameSet\fP 1i +A specified name set resource identifier is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreePipelineContext +.RE +.bp +.SH +PEXFreePCAttributes - Free Storage Returned by PEXGetPipelineContext +.XS + PEXFreePCAttributes +.XE +.IN "PEXFreePCAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePCAttributes\^(\^PEXPCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the pipeline context attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.LP +This function deallocates memory returned by +.PN PEXGetPipelineContext . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetPipelineContext +.RE +.bp +.SH +PEXFreePipelineContext - Free Pipeline Context +.XS + PEXFreePipelineContext +.XE +.IN "PEXFreePipelineContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePipelineContext\^(\^Display *\fIdisplay\fP\^, PEXPipelineContext \fIcontext\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the pipeline context. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the association between the pipeline context +resource identifier and the pipeline context. The pipeline context +is freed when no other resource references it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXPipelineContext\fP 1i +The specified pipeline context resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext +.RE +.bp +.SH +PEXGetPipelineContext - Get Pipeline Context Attributes +.XS + PEXGetPipelineContext +.XE +.IN "PEXGetPipelineContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPCAttributes *PEXGetPipelineContext\^(\^Display *\fIdisplay\fP\^, PEXPipelineContext \fIcontext\fP\^, unsigned long *\fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the pipeline context. +.IP \fIvalue_mask\fP 1i +A pointer to an array of three unsigned long. +.RE +.SH +Returns +.RS +.LP +A pointer to pipeline context values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the requested attribute values of the pipeline context. +The value mask indicates which attribute values are requested. +.PN PEXSetPCAttributeMask +and +.PN PEXSetPCAttributeMaskAll +can be called to setup the value mask. +PEXlib allocates the memory for the return value. +.PN PEXFreePCAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPipelineContext; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPipelineContext\fP 1i +The specified pipeline context resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext , +.PN PEXChangePipelineContext +.RE +.bp +.SH +PEXSetPCAttributeMask - Macro to Setup Pipeline Context Attributes Value Mask +.XS + PEXSetPCAttributeMask +.XE +.IN "PEXSetPCAttributeMask" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSetPCAttributeMask(\^\fImask\fP\^, \fIattr\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImask\fP 1i +The address of the value mask - an array of three unsigned long. +.IP \fIattr\fP 1i +A single pipeline context attribute bitmask constant. +.RE +.SH +Description +.RS +.LP +This is a utility macro +to aid in setting up the bitmask for the pipeline +context attributes. +.LP +The following attribute bitmask constants must be used: +.ID +.PN PEXPCMarkerType +.PN PEXPCMarkerScale +.PN PEXPCMarkerColor +.PN PEXPCMarkerBundleIndex +.PN PEXPCTextFont +.PN PEXPCTextPrecision +.PN PEXPCCharExpansion +.PN PEXPCCharSpacing +.PN PEXPCTextColor +.PN PEXPCCharHeight +.PN PEXPCCharUpVector +.PN PEXPCTextPath +.PN PEXPCTextAlignment +.PN PEXPCATextHeight +.PN PEXPCATextUpVector +.PN PEXPCATextPath +.PN PEXPCATextAlignment +.PN PEXPCATextStyle +.PN PEXPCTextBundleIndex +.PN PEXPCLineType +.PN PEXPCLineWidth +.PN PEXPCLineColor +.PN PEXPCCurveApprox +.PN PEXPCPolylineInterp +.PN PEXPCLineBundleIndex +.PN PEXPCInteriorStyle +.PN PEXPCInteriorStyleIndex +.PN PEXPCSurfaceColor +.PN PEXPCReflectionAttr +.PN PEXPCReflectionModel +.PN PEXPCSurfaceInterp +.PN PEXPCBFInteriorStyle +.PN PEXPCBFInteriorStyleIndex +.PN PEXPCBFSurfaceColor +.PN PEXPCBFReflectionAttr +.PN PEXPCBFReflectionModel +.PN PEXPCBFSurfaceInterp +.PN PEXPCSurfaceApprox +.PN PEXPCCullingMode +.PN PEXPCDistinguishFlag +.PN PEXPCPatternSize +.PN PEXPCPatternRefPoint +.PN PEXPCPatternRefVec1 +.PN PEXPCPatternRefVec2 +.PN PEXPCInteriorBundleIndex +.PN PEXPCSurfaceEdgeFlag +.PN PEXPCSurfaceEdgeType +.PN PEXPCSurfaceEdgeWidth +.PN PEXPCSurfaceEdgeColor +.PN PEXPCEdgeBundleIndex +.PN PEXPCLocalTransform +.PN PEXPCGlobalTransform +.PN PEXPCModelClip +.PN PEXPCModelClipVolume +.PN PEXPCViewIndex +.PN PEXPCLightState +.PN PEXPCDepthCueIndex +.PN PEXPCASFValues +.PN PEXPCPickID +.PN PEXPCHLHSRIdentifier +.PN PEXPCNameSet +.PN PEXPCColorApproxIndex +.PN PEXPCRenderingColorModel +.PN PEXPCParaSurfCharacteristics +.DE +Note that this macro does multiple evaluations of the value for attr. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext , +.PN PEXChangePipelineContext , +.PN PEXCopyPipelineContext , +.PN PEXGetPipelineContext +.RE +.bp +.SH +PEXSetPCAttributeMaskAll - Macro to Set All Pipeline Context Attributes in Value Mask +.XS + PEXSetPCAttributeMaskAll +.XE +.IN "PEXSetPCAttributeMaskAll" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSetPCAttributeMaskAll(\^\fImask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImask\fP 1i +The address of the value mask - an array of three unsigned long. +.RE +.SH +Description +.RS +.LP +This is a utility macro +to aid in setting up the bitmask for the pipeline +context attributes. This macro will set all valid bits in the mask. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePipelineContext , +.PN PEXChangePipelineContext , +.PN PEXCopyPipelineContext , +.PN PEXGetPipelineContext +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter05 b/xc/doc/specs/PEX5/PEXlib/chapter05 new file mode 100644 index 000000000..6bffc92f9 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter05 @@ -0,0 +1,1653 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 5\fP\s-1 + +\s+1\fBRenderers\fP\s-1 +.sp 2 +.nr H1 5 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 5: Renderers +.XE +.IN "renderers" +.LP +PEX deals with three-dimensional (geometric) objects and color values +specified by clients. Rendering is the process that converts geometric +information into raster (2D) coordinates and converts color values into colors +or intensities the device can display. Geometric or color data is rendered +to an X drawable after it has been transformed into raster data. The +rendering pipeline is an abstraction used to describe the order +.IN "rendering pipeline" +.IN "pipeline" "rendering" +and the semantics of functions occurring during the rendering process. +.LP +A renderer is a PEX resource containing the functionality necessary to +.IN "renderer" +perform rendering. +A renderer also contains attributes, some of which are resource identifiers for +various tables and name sets, and for the pipeline context from which initial +rendering pipeline attributes are copied. +When a renderer is created, if lookup table resources are not specified for +some lookup tables, the default value will be no lookup table. When rendering, +if a lookup table resource doesn't exist in the renderer, the default values +will be used. These defaults are given in the corresponding description of +the output commands in \fIChapter 2: Output Commands\fP. +The default name set is an empty set. +If no pipeline context is specified, the default pipeline context values will +be used. These defaults are given in \fIChapter 4: Pipeline Contexts\fP. +.LP +If a pipeline context, lookup table or name set resource is bound to the +renderer and then freed, inquiries on the renderer attributes will return +the value of +.PN PEXAlreadyFreed +for those particular resource identifiers. +.LP +.IN "immediate-mode" +.IN "retained-mode" +.IN "structure-mode" +Output commands sent to a renderer are rendered immediately. +Output commands can also be stored in a structure resource, and then the +structure traversed by a renderer. +In this way, renderers support both concepts of immediate-mode and +retained- or structure-mode graphics. +.LP +.PN PEXBeginRendering +is called to prepare a renderer for immediate-mode rendering. +.Pn ( PEXRenderNetwork +also implicitly performs a "begin rendering".) +The PEX server implementation may allow certain renderer attributes to be bound +only at the time of +.PN PEXBeginRendering +or at any time during the lifetime of the renderer resource. +.PN PEXGetRendererDynamics +can be called to obtain information about how renderer attributes are bound for +a particular PEX implementation. +.LP +If a drawable associated with a renderer is destroyed while a renderer is +rendering, an implicit +.PN PEXEndRendering +is performed by the server with the flush flag equal to +.PN False +in order to return the renderer to the +.PN PEXIdle +renderer state. All subsequent output and +traversal requests to the renderer are ignored and no error is generated. +.LP +If a drawable associated with a renderer is resized while a renderer is +rendering, an implicit +.PN PEXEndRendering +is performed by the server with the flush flag equal to +.PN False +in order to return the renderer to the +.PN PEXIdle +renderer state. All subsequent output and +traversal requests to the renderer are ignored until the next request to the +renderer to begin rendering or begin a pick operation and no error is generated. +.LP +If a drawable that is associated with a renderer is moved, exposed or occluded +while the renderer is rendering, the +server will continue to process output commands and requests using the new +drawable attributes until the rendering operation is explicitly or implicitly +terminated. +.LP +A renderer also manages the HLHSR buffer +needed for some HLHSR (hidden-line/hidden-surface removal) algorithms. +When the renderer begins rendering (either an explicit or implicit +.PN PEXBeginRendering ) +and the HLHSR mode indicates z-buffering +should be performed, a z-buffer suitable for use with the specified drawable +is allocated, if necessary, and bound to the renderer. A new z-buffer is +allocated only if one does not already exist for the renderer, or if the +z-buffer currently bound to the renderer is not suitable for the specified +drawable. +If the z-buffer could not be allocated, an allocation error is generated and +the rendering is aborted. If the clear z flag is enabled, or if a new z-buffer +is allocated, then the z-buffer will be cleared to infinity in the region +specified by the renderer's current clip list. The value of infinity is +implementation-dependent. The z-buffer is not deallocated when an explicit +or implicit +.PN PEXEndRendering +occurs. The z-buffer remains bound to the renderer until the renderer is +freed or until a new one is allocated as described above. This means that +when the next +.PN PEXBeginRendering +occurs, the z-buffer will be re-used if possible. This allows the application +to control operations that require the z-buffer to remain intact between +rendering traversals and immediate-mode primitives. Some reasons why the +z-buffer may not be re-usable are the specification of a different drawable +or the previous drawable was resized. +.LP +Also, the renderer resource does not contain a double-buffer mode, whereas the +PHIGS workstation resource does. This does not preclude the use of the PEX +renderer resource in a double-buffered drawable. It is intended that +applications will use the \fIMulti-Buffer Extension\fP to X (MBX) for +double-buffering with a PEX renderer resource. +.LP +The next section describes the attributes of a renderer and their effects. +.NH 2 +Renderer Attributes +.XS +\*(SN Renderer Attributes +.XE +.LP +Each renderer has the following attributes that are not directly modifiable +(via +.PN PEXChangeRenderer ) +but are inquirable (via +.PN PEXGetRendererAttributes ): +.ID +renderer state +current path +.DE +.LP +The renderer state attribute is used to identify whether a renderer is currently +.PN PEXRendering , +.PN PEXPicking , +or +.PN PEXIdle . +Calling +.PN PEXBeginRendering +puts a renderer in the +.PN PEXRendering +state. +See \fIChapter 6: Renderer Picking\fP for more information about the picking +renderer state. +Output primitives or attributes are processed by a renderer only when the +renderer state is +.PN PEXRendering +or +.PN PEXPicking . +Calling +.PN PEXEndRendering +puts a renderer in the +.PN PEXIdle +state. Output primitives sent to an idle renderer are ignored. +.LP +.sp +.IN "current path" +.IN "path" "current" +The current path attribute contains a list of element references which +indicate paths for use by an application doing immediate-mode rendering, +or traversing structures via the "execute structure" output command. +Applications can use +.PN PEXBeginStructure +and +.PN PEXEndStructure +to maintain the current path during immediate-mode rendering. +The current path attribute is initialized to structure id 0 and offset 0. +.LP +.sp +Each renderer has the following attributes that are modifiable (via +.PN PEXChangeRenderer ) +and inquirable (via +.PN PEXGetRendererAttributes ): +.ID +pipeline context +color approximation table +color table +depth cue table +edge bundle +interior bundle +light table +line bundle +marker bundle +pattern table +text bundle +text font table +view table +highlight inclusion +highlight exclusion +invisibility inclusion +invisibility exclusion +pick inclusion +pick exclusion +HLHSR mode +NPC subvolume +viewport +clip list +pick start path +background color +clear image flag +clear z flag +echo mode +.DE +.LP +.IN "pipeline context" +.IN "pipeline state" +Each renderer has a set of state information (the renderer's +pipeline state) that defines the behavior of the rendering pipeline. A +renderer's pipeline state contains all attributes stored in a PEX pipeline +context. +.PN PEXBeginRendering +copies into the renderer's pipeline state +the attributes in the pipeline context specified by the renderer's pipeline +context attribute. If the pipeline context attribute does not contain the +resource id of a valid pipeline context resource, the default values for +pipeline context attributes are copied instead. +.LP +Each time a renderer encounters an "execute structure" command, the renderer's +pipeline state is saved. When the called structure has been executed, this +saved pipeline state is restored. Note that only the pipeline state values +are saved and restored. The renderer state and current path attributes are not +saved and restored, since they are not modifiable from within a structure. +.LP +A renderer's pipeline state attributes are modified by output attribute +functions. +.LP +.sp +Each of the bundle and table attributes contains the resource id of the +specified type of +lookup table. If not set when the renderer is created, they are all NULL. +If they are NULL during the +rendering operation, the default attributes for the lookup table are used. +Pipeline attributes whose ASFs are set to +.PN PEXBundled +obtain their values from the edge bundle, interior bundle, line bundle, +marker bundle and text bundle tables. +.LP +The view table provides clipping information and the orientation and mapping +matrices. Indexed colors passed to the renderer are dereferenced using the +color table. The depth-cue table provides depth-cueing information. +The light table stores definitions for all light sources available to the +renderer. The color approximation table contains the rules and hints for +converting rendering pipeline colors into pixel values consistent with the +visual and color map for the drawable. +The text font table contains a list of X and PEX font resource identifiers. +See \fIChapter 3: Lookup Tables\fP for more details on the different types +of lookup tables. +.LP +.sp +.IN "filters" +.IN "highlight filter" +.IN "invisibility filter" +.IN "pick filter" +Each of the inclusion and exclusion attributes contains the resource id of a +name set resource which +is associated with each renderer as filters. If not set when the renderer is +created, these filters are NULL, which means they contain no names. +.LP +Highlighting is the process of drawing attention to an output primitive by +altering its visual attributes in an implementation-dependent way. Primitives +treated as invisible are simply not sent through the rendering +pipeline. Each filter consists of two name sets: an inclusion set and an +exclusion set. Another name set is maintained as part of the renderer's +pipeline state. Some output commands add and remove information from +the pipeline's name set. +.LP +For a primitive to be highlighted, the pipeline's name set must contain a +name (a 32-bit identifier) that also exists in the highlight inclusion name set. The +highlighted primitive pipeline's name set must not contain names found in the +highlight exclusion name set. For a primitive to be treated as invisible, the +pipeline's name set must contain a name that also exists in the invisibility +inclusion name set. The invisible primitive pipeline's name set must not +contain names also found in the invisibility exclusion name set. In other +words, to meet the filtering criteria for either highlighting or invisibility, +the intersection of the name set with the inclusion set must not be empty, and +the intersection of the name set with the exclusion set must be the empty set. +.LP +See \fIChapter 6: Renderer Picking\fP for information on the pick filters. +.LP +.sp +The default HLHSR mode is +.PN PEXHLHSROff. +Each renderer maintains an HLHSR mode indicating the hidden line and hidden +surface algorithm used. Each renderer also maintains an HLHSR buffer used in +the hidden line and hidden surface computations. When +.PN PEXBeginRendering +is +called, the HLHSR buffer is initialized based on the current value of the HLHSR +mode. +When +.PN PEXEndRendering +is called, if the flush flag is +.PN True , +unprocessed output primitives are rendered using the chosen HLHSR algorithm. +If the flush flag is +.PN False , +unprocessed output primitives are discarded. +.LP +.sp +.IN "NPC subvolume" +.IN "viewport" +.IN "clip list" +The NPC subvolume attribute contains +the normalized projection coordinates for the sub-volume space that is mapped +to the viewport. +The default NPC subvolume is [0.0, 1.0] in all three dimensions, x, y, z. +.LP +The viewport attribute describes the area within the drawable in which rendering +may appear. The viewport coordinates are specified in device coordinates, which +have an x,y offset (in pixels) from the lower-left corner of the drawable. +Note that the y-component is the reverse of the X window system coordinate +system. +It is permissible to specify a viewport with boundaries outside of the drawable. +Geometry that is mapped to values outside the drawable is clipped. Viewport z +values must be in the range of 0.0 to 1.0, where z=0.0 maps to the +device-coordinate z value representing objects that are furthest from the +viewing position, and z=1.0 maps to the device-coordinate value representing +objects that are closest to the viewing position. Depending on the dynamics of +the viewport attribute (see +.PN PEXGetRendererDynamics ), +the values that define a viewport may be bound at any time, or they may take +effect only at the time of +.PN PEXBeginRendering . +Whenever the viewport values are bound, the viewport's use drawable flag is +examined first. If it is set to +.PN True , +the viewport width and height are obtained from the drawable's current width +and height and the viewport z values are obtained from the values specified +in the viewport structure. If the use drawable flag is +.PN False , +the viewport width, height and z values are all set to the values in the +viewport structure. The viewport is then set to the largest rectangle, anchored +at the lower-left corner of the drawable, that achieves an isotropic mapping to +the renderer's NPC subvolume. The viewport will remain in the same position +relative to the lower-left hand corner of the drawable after a resize event +has occurred. +The default viewport size is implementation-dependent, and the default +use drawable flag is +.PN True . +.LP +The clip list contains a list of rectangles in device coordinates that define +the portions of the drawable in which rendering is allowed. If the list is +empty, the renderer will render to the entire drawable area. If the list +is not empty, only the area within the rectangles will be affected during +rendering. The rectangles must be non-overlapping or the result is undefined +and implementation-dependent. The rectangles in the clip list are defined +in device coordinates. (0,0) is the lower left corner of the +drawable and the xmax and ymax values are inclusive. These rectangles will +remain in the same position relative to the lower left +corner of the drawable after a resize has occurred. Note, if a z-buffering +algorithm is used for HLHSR, only those z-values associated with pixels that +are within the defined area of the clip list will be modified. +.LP +.sp +The pick start path is used as the starting path for "pick all". +See \fIChapter 6: Renderer Picking\fP for more information. +.LP +.sp +The background color is used to clear the drawable area when an explicit or +implicit +.PN PEXBeginRendering +occurs. The drawable will be cleared only if the clear image flag is +enabled. If the clear image flag is disabled, the drawable will not be cleared. +The default value for the clear image flag is +.PN False . +The clip list will be taken into account when clearing the drawable. +The initial index to the color approximation table is used to +map the color to a device pixel value. +.LP +.sp +The clear z flag indicates whether the z-buffer should be cleared to infinity +at the start of rendering. The value of infinity is implementation-dependent. +The default value for the clear image flag is +.PN True . +The clip list will be taken into account when clearing the z-buffer. This +attribute is ignored if the HLHSR mode is not one that requires a z-buffer. +.LP +.sp +The echo mode indicates whether rendered primitives should be echoed, unechoed +or rendered normally. The method used for echoing and unechoing primitives +is implementation-dependent and there is no guarantee that the method will +preserve temporal priority. Echoing takes precedence over highlighting. +There is a standard PEX escape for setting an echo color that will provide +more control over the echo method used, if the escape is supported. (See +.PN PEXSetEchoColor .) +.NH 2 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.ID +.Co +/* renderer attributes */ +.sp +typedef struct { + PEXPipelineContext pipeline_context; + PEXStructurePath current_path; + PEXLookupTable marker_bundle; + PEXLookupTable text_bundle; + PEXLookupTable line_bundle; + PEXLookupTable interior_bundle; + PEXLookupTable edge_bundle; + PEXLookupTable view_table; + PEXLookupTable color_table; + PEXLookupTable depth_cue_table; + PEXLookupTable light_table; + PEXLookupTable color_approx_table; + PEXLookupTable pattern_table; + PEXLookupTable text_font_table; + PEXNameSet highlight_incl; + PEXNameSet highlight_excl; + PEXNameSet invisibility_incl; + PEXNameSet invisibility_excl; + int renderer_state; + PEXEnumTypeIndex hlhsr_mode; /* PEXHLHSROff, PEXHLHSRZBuffer, */ + /* PEXHLHSRPainters, PEXHLHSRScanline, */ + /* PEXHLHSRHiddenLineOnly, */ + /* PEXHLHSRZBufferID */ + PEXNPCSubVolume npc_subvolume; + PEXViewport viewport; + PEXListOfClipRect clip_list; + PEXNameSet pick_incl; + PEXNameSet pick_excl; + PEXStructurePath pick_start_path; + PEXColorSpecifier background_color; + Bool clear_image; /* True or False */ + Bool clear_z; /* True or False */ + int echo_mode; /* PEXNoEcho, PEXEcho, PEXUnEcho */ +} PEXRendererAttributes; +.sp +typedef XID PEXPipelineContext; +typedef XID PEXLookupTable; +typedef XID PEXNameSet; +typedef short PEXEnumTypeIndex; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord min; + PEXDeviceCoord max; + PEXSwitch use_drawable; /* True or False */ + unsigned char reserved[3]; +} PEXViewport; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef unsigned char PEXSwitch; +.sp +typedef struct { + unsigned short count; /* number of device rectangles */ + PEXDeviceRect *rectangles; +} PEXListOfClipRect; +.sp +typedef struct { + short xmin; + short ymin; + short xmax; + short ymax; +} PEXDeviceRect; +.sp +typedef struct { + PEXColorType type; /* PEXColorTypeIndexed, PEXColorTypeRGB, */ + /* PEXColorTypeCIE, PEXColorTypeHSV, */ + /* PEXColorTypeHLS, PEXColorTypeRGB8, */ + /* PEXColorTypeRGB16 */ + unsigned short reserved; + PEXColor value; +} PEXColorSpecifier; +.sp +typedef short PEXColorType; +.sp +typedef union { + PEXColorIndexed indexed; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; +} PEXColor; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.ft P +.DE +.bp +.XS +Function Descriptions +.XE +.SH +PEXAccumulateState - Accumulate Rendering Pipeline State +.XS + PEXAccumulateState +.XE +.IN "PEXAccumulateState" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXAccumulateState\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, unsigned long \fIcount\fP\^, PEXElementRef *\fIelements\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer resource. +.IP \fIcount\fP 1i +The number of elements. +.IP \fIelements\fP 1i +A pointer to the structure element reference path. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function accumulates the state that would be in effect if a traversal were +done to the element specified in the path. If the renderer state is +.PN PEXIdle , +the request is ignored. +.LP +The accumulation of rendering pipeline state begins with the current pipeline +attributes. A linear traversal down the specified path is then made and +the structure elements that lie along the specified path are examined in order. +Any element that contains an output command that would modify the pipeline +state (i.e. output attributes) is sent to the renderer for processing. All +other output commands (i.e. output primitives and structure output commands) +are skipped. The traversal is flat meaning that the current pipeline attributes +will not be saved when a structure in the path is executed. +However, the current path offset is incremented for each output command that +is encountered during the state accumulation. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +typedef XID PEXStructure; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginRendering , +.PN PEXCreateStructure , +.PN PEXCreateRenderer +.RE +.bp +.SH +PEXBeginRendering - Begin Rendering +.XS + PEXBeginRendering +.XE +.IN "PEXBeginRendering" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBeginRendering\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function initializes the specified renderer and binds the +specified drawable to it. Subsequent output primitive commands +sent to renderer produce output to the specified drawable. +The renderer's pipeline state is initialized to the values +in its pipeline context, or to default values +if there is no pipeline context. This function causes the +renderer's renderer state to be set to +.PN PEXRendering +and its +current path to be set to <0,0>. The renderer's +HLHSR mode is used to initialize hidden surface computations. +(For example, the z-buffer is initialized if the HLHSR mode is +set to +.PN PEXHLHSRZBuffer +or +.PN PEXHLHSRZBufferID .) +.LP +If the renderer's state is +.PN PEXRendering +or +.PN PEXPicking +when this request is received, an implicit "end rendering or picking" +request is performed before the "begin rendering" request is executed. +Output commands received by a renderer are ignored if the state is +not +.PN PEXRendering +or +.PN PEXPicking . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer , +.PN PEXEndRendering +.RE +.bp +.SH +PEXBeginStructure - Save Rendering Pipeline State +.XS + PEXBeginStructure +.XE +.IN "PEXBeginStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBeginStructure\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, long \fIstructure_id\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer. +.IP \fIstructure_id\fP 1i +A value to be used as an application-specified structure identifier. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Application programs can use this function to simulate the +effects of the execute structure output command. This request +saves the rendering pipeline attributes in the specified +renderer. This request also increments the element offset +of the last entry in the renderer's current path. +The function then adds the structure id and an element offset +of zero to the renderer's current path. +.LP +The rendering pipeline's global transform attribute is set to the +matrix computed by concatenating the current local transform +and current global transform matrices. The local transform +matrix is then set to the identity matrix. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXEndStructure , +.PN PEXExecuteStructure , +.PN PEXCreateRenderer +.RE +.bp +.SH +PEXChangeRenderer - Change Renderer Attributes +.XS + PEXChangeRenderer +.XE +.IN "PEXChangeRenderer" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXChangeRenderer\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, unsigned long \fIvalue_mask\fP\^, PEXRendererAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIvalue_mask\fP 1i +A mask indicating the renderer attributes to be changed. +.IP \fIvalues\fP 1i +A pointer to new values for the renderer attributes. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function modifies attributes of the specified renderer resource. +The value mask indicates the attribute values to be modified. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXRAPipelineContext +.PN PEXRAMarkerBundle +.PN PEXRATextBundle +.PN PEXRALineBundle +.PN PEXRAInteriorBundle +.PN PEXRAEdgeBundle +.PN PEXRAViewTable +.PN PEXRAColorTable +.PN PEXRADepthCueTable +.PN PEXRALightTable +.PN PEXRAColorApproxTable +.PN PEXRAPatternTable +.PN PEXRATextFontTable +.PN PEXRAHighlightIncl +.PN PEXRAHighlightExcl +.PN PEXRAInvisibilityIncl +.PN PEXRAInvisibilityExcl +.PN PEXRAHLHSRMode +.PN PEXRANPCSubVolume +.PN PEXRAViewport +.PN PEXRAClipList +.PN PEXRAPickIncl +.PN PEXRAPickExcl +.PN PEXRAPickStartPath +.PN PEXRABackgroundColor +.PN PEXRAClearImage +.PN PEXRAClearZ +.PN PEXRAEchoMode +.DE +.LP +Note that the renderer's current path and renderer state +attributes cannot be set explicitly using this function. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +See also the \fICommon Data Structures\f section. +.DE +.SH +Errors +.RS +.IP \fIBadMatch\fP 1i +The specified lookup table resource was not created with a drawable compatible +with the drawable used to create the renderer resource. +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid. +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPipelineContext\fP 1i +The specified pipeline context resource identifier is invalid. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer , +.PN PEXGetRendererAttributes , +.PN PEXGetRendererDynamics +.RE +.bp +.SH +PEXCreateRenderer - Create Renderer +.XS + PEXCreateRenderer +.XE +.IN "PEXCreateRenderer" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXRenderer PEXCreateRenderer\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, unsigned long \fIvalue_mask\fP\^, PEXRendererAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIvalue_mask\fP 1i +A mask indicating the attribute values specified. +.IP \fIvalues\fP 1i +A pointer to values used to override default values in the new renderer resource. +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created renderer resource. +.RE +.SH +Description +.RS +.LP +This function creates a renderer and returns the resource identifier of the +newly-created renderer resource. +The value mask indicates which attribute values are specified. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXRAPipelineContext +.PN PEXRAMarkerBundle +.PN PEXRATextBundle +.PN PEXRALineBundle +.PN PEXRAInteriorBundle +.PN PEXRAEdgeBundle +.PN PEXRAViewTable +.PN PEXRAColorTable +.PN PEXRADepthCueTable +.PN PEXRALightTable +.PN PEXRAColorApproxTable +.PN PEXRAPatternTable +.PN PEXRATextFontTable +.PN PEXRAHighlightIncl +.PN PEXRAHighlightExcl +.PN PEXRAInvisibilityIncl +.PN PEXRAInvisibilityExcl +.PN PEXRAHLHSRMode +.PN PEXRANPCSubVolume +.PN PEXRAViewport +.PN PEXRAClipList +.PN PEXRAPickIncl +.PN PEXRAPickExcl +.PN PEXRAPickStartPath +.PN PEXRABackgroundColor +.PN PEXRAClearImage +.PN PEXRAClearZ +.PN PEXRAEchoMode +.DE +.LP +Fields not explicitly set have default values (see the +beginning of the chapter). +The renderer resource may only be used in conjunction +with drawables that have the same root and depth as specified drawable. +.LP +Note that the renderer's current path and renderer state +attributes cannot be set explicitly using this function. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified lookup table resource +was not created with a drawable compatible with the specified drawable. +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid. +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPipelineContext\fP 1i +The specified pipeline context resource identifier is invalid. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeRenderer +.RE +.bp +.SH +PEXEndRendering - End Rendering +.XS + PEXEndRendering +.XE +.IN "PEXEndRendering" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXEndRendering\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, int \fIflush\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer. +.IP \fIflush\fP 1i +.PN True +or +.PN False +- specifying whether any pending output for renderer is to be rendered onto its +associated drawable. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function terminates rendering on the specified renderer resource. +If flush is +.PN True , +pending output is rendered onto its +associated drawable. If flush is +.PN False , +pending output is discarded. +In either case, the renderer state +is set to +.PN PEXIdle . +If the renderer state is +.PN PEXIdle , +the request is ignored. +If the renderer state is +.PN PEXPicking , +then an error is generated. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer , +.PN PEXBeginRendering +.RE +.bp +.SH +PEXEndStructure - Restore Rendering Pipeline State +.XS + PEXEndStructure +.XE +.IN "PEXEndStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXEndStructure\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Application programs can use this function to simulate the side effects +of the return from an "execute structure" output command. This request +restores the last-saved rendering pipeline attributes in renderer. +This request also removes the last element reference in the renderer's +current path. Subsequent output commands cause the element +offset of the element reference at the end of the list to be +incremented. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +There is no matching begin structure. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginStructure , +.PN PEXExecuteStructure , +.PN PEXCreateRenderer +.RE +.bp +.SH +PEXFreeRenderer - Free Renderer +.XS + PEXFreeRenderer +.XE +.IN "PEXFreeRenderer" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeRenderer\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the renderer resource specified by renderer and +frees the memory associated with it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer +.RE +.bp +.SH +PEXFreeRendererAttributes - Free Storage Returned by PEXGetRendererAttributes +.XS + PEXFreeRendererAttributes +.XE +.IN "PEXFreeRendererAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeRendererAttributes\^(\^PEXRendererAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the renderer attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetRendererAttributes . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetRendererAttributes +.RE +.bp +.SH +PEXGetRendererAttributes - Get Renderer Attribute Values +.XS + PEXGetRendererAttributes +.XE +.IN "PEXGetRendererAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXRendererAttributes *PEXGetRendererAttributes\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, unsigned long \fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer to be queried. +.IP \fIvalue_mask\fP 1i +A mask indicating attributes to be returned from the renderer. +.RE +.SH +Returns +.RS +.LP +A pointer to the renderer attribute values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns attribute values from the specified renderer resource. +The value mask indicates the attribute values to be returned. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXRAPipelineContext +.PN PEXRACurrentPath +.PN PEXRAMarkerBundle +.PN PEXRATextBundle +.PN PEXRALineBundle +.PN PEXRAInteriorBundle +.PN PEXRAEdgeBundle +.PN PEXRAViewTable +.PN PEXRAColorTable +.PN PEXRADepthCueTable +.PN PEXRALightTable +.PN PEXRAColorApproxTable +.PN PEXRAPatternTable +.PN PEXRATextFontTable +.PN PEXRAHighlightIncl +.PN PEXRAHighlightExcl +.PN PEXRAInvisibilityIncl +.PN PEXRAInvisibilityExcl +.PN PEXRARendererState +.PN PEXRAHLHSRMode +.PN PEXRANPCSubVolume +.PN PEXRAViewport +.PN PEXRAClipList +.PN PEXRAPickIncl +.PN PEXRAPickExcl +.PN PEXRAPickStartPath +.PN PEXRABackgroundColor +.PN PEXRAClearImage +.PN PEXRAClearZ +.PN PEXRAEchoMode +.DE +.LP +PEXlib allocates the memory for the returned renderer attribute values. +.PN PEXFreeRendererAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer , +.PN PEXChangeRenderer , +.PN PEXGetRendererDynamics , +.br +.PN PEXFreeRendererAttributes +.RE +.bp +.SH +PEXGetRendererDynamics - Get Renderer Attribute Modification Dynamics +.XS + PEXGetRendererDynamics +.XE +.IN "PEXGetRendererDynamics" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetRendererDynamics\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, unsigned long *\fItables_return\fP\^, unsigned long *\fIname_sets_return\fP\^, unsigned long *\fIattributes_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fItables_return\fP 1i +Returns a mask describing dynamics of lookup tables associated with the renderer. +.IP \fIname_sets_return\fP 1i +Returns a mask describing dynamics of name sets associated with the renderer. +.IP \fIattributes_return\fP 1i +Returns a mask describing dynamics of other attributes associated with the renderer. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the modification dynamics for all of the +attributes of the specified renderer resource. Each bit, in the +returned bitmasks, indicates the dynamics for a particular renderer attribute. +For each bit, a value of +.PN PEXDynamic +indicates that the +specified attribute may be modified at any time, and the change will +take place immediately. A value of +.PN PEXNotDynamic +indicates that the specified +attribute may not be modified dynamically. In this case, the change +is "pending" and will take effect at the next explicit or implicit +.PN PEXBeginRendering . +.LP +The pipeline context, pick start path, background color, clear image and clear +z renderer attributes all take effect only at the time of "begin rendering or +picking", and so do not have dynamics associated with them. +.LP +The bits in the tables bitmask are accessed with the following constants: +.ID +.PN PEXRDTMarkerBundle +.PN PEXRDTTextBundle +.PN PEXRDTLineBundle +.PN PEXRDTInteriorBundle +.PN PEXRDTEdgeBundle +.PN PEXRDTViewTable +.PN PEXRDTColorTable +.PN PEXRDTDepthCueTable +.PN PEXRDTLightTable +.PN PEXRDTColorApproxTable +.PN PEXRDTPatternTable +.PN PEXRDTTextFontTable +.PN PEXRDTMarkerBundleContents +.PN PEXRDTTextBundleContents +.PN PEXRDTLineBundleContents +.PN PEXRDTInteriorBundleContents +.PN PEXRDTEdgeBundleContents +.PN PEXRDTViewTableContents +.PN PEXRDTColorTableContents +.PN PEXRDTDepthCueTableContents +.PN PEXRDTLightTableContents +.PN PEXRDTColorApproxContents +.PN PEXRDTPatternTableContents +.PN PEXRDTTextFontTableContents +.DE +The bits in the name sets bitmask are accessed with the following constants: +.ID +.PN PEXRDNHighlightNameSet +.PN PEXRDNInvisibilityNameSet +.PN PEXRDNPickNameSet +.PN PEXRDNHighlightNameSetContents +.PN PEXRDNInvisibilityNameSetContents +.PN PEXRDNPickNameSetContents +.DE +The bits in the attributes bitmask are accessed with the following constants: +.ID +.PN PEXRDAHLHSRMode +.PN PEXRDANPCSubVolume +.PN PEXRDAViewport +.PN PEXRDAClipList +.PN PEXRDAEchoMode +.DE +.RE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateRenderer , +.PN PEXChangeRenderer , +.PN PEXBeginRendering +.RE +.bp +.SH +PEXRenderElements - Render Elements +.XS + PEXRenderElements +.XE +.IN "PEXRenderElements" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRenderElements\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer resource. +.IP \fIstructure\fP 1i +The resource identifier of a structure resource. +.IP \fIwhence1\fP 1i +A value specifying, with offset1, the first limit of the element range +.Pn ( PEXBeginning , +.PN PEXCurrent +.PN PEXEnd ). +.IP \fIoffset1\fP 1i +An offset from whence1 specifying the first limit of the element range. +.IP \fIwhence2\fP 1i +A value specifying, with offset2, the second limit of the element range +.Pn ( PEXBeginning , +.PN PEXCurrent +.PN PEXEnd ). +.IP \fIoffset2\fP 1i +An offset from whence2 specifying the second limit of the element range. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function processes all output commands in the specified element range +of the specified structure. +Output primitives in structure are +rendered using the specified renderer. If the renderer is not rendering or +picking, the request will be ignored. Structures referenced +through execute structure output commands are also processed. +.LP +The first limit of the range is defined by whence1 and offset1 and the second +limit of the range is defined by whence2 and offset2. +The whence values describe how to interpret the corresponding offset. +.PN PEXBeginning +means the element position is the value of offset (i.e. the offset from the +beginning of the structure). +.PN PEXCurrent +means the element position is the value of the current element pointer position +plus the value of offset (i.e. the offset from the current element pointer). +.PN PEXEnd +means the element position is the value of the last element position in the +structure plus the value of offset (i.e. the offset from the end of the structure). +Offsets can be negative values. +If after computing an element position, it +is less than zero, the position will be set to zero. +If after computing an element position, it +is greater than the number of elements in the structure, it will be set to +the last structure element in the structure. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence was invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginRendering , +.PN PEXCreateStructure , +.PN PEXCreateRenderer +.RE +.bp +.SH +PEXRenderNetwork - Render Network +.XS + PEXRenderNetwork +.XE +.IN "PEXRenderNetwork" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRenderNetwork\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^, PEXStructure \fIstructure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer resource. +.IP \fIstructure\fP 1i +The resource identifier of a structure resource. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function processes all output commands stored in structure using +the specified renderer. Output primitives in structure are +rendered to the specified drawable. Structures referenced +through execute structure output commands are also processed. +This request effectively performs an implicit +.PN PEXBeginRendering +before the traversal of the specified structure network and +an implicit +.PN PEXEndRendering , +with a flush value of +.PN True , +after the traversal. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources necessary to complete request. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXExecuteStructure , +.PN PEXBeginRendering , +.PN PEXEndRendering , +.br +.PN PEXCreateStructure , +.PN PEXCreateRenderer +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter06 b/xc/doc/specs/PEX5/PEXlib/chapter06 new file mode 100644 index 000000000..f90a70105 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter06 @@ -0,0 +1,1187 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 6\fP\s-1 + +\s+1\fBRenderer Picking\fP\s-1 +.sp 2 +.nr H1 6 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 6: Renderer Picking +.XE +.LP +.IN "renderer" "picking" +The semantics of renderer picking are identical to rendering except that during +picking, primitives are hit tested instead of coverted to pixels. +All primitives which are passed to the rendering pipeline (i.e. they are not +made invisible by the invisibility filter and they are not culled by the current +culling mode) are eligible for picking. Picking uses the geometric definition +of primitives, so it is possible for hollow, empty and transparent fill areas to +be picked. However, it is implementation-dependent whether rendering effects +which increase the area of the primitive (such as linewidth) are considered. +.LP +Two types of +hit test rendering and traversals are supported "pick one" and "pick all". +"Pick one" will return at most one primitive which satisfies the pick criteria. +"Pick all" will return all hit primitives which satisfy the pick criteria, up +to the application specified maximum number of hits. +For both types, the hit test which is performed on the +primitives is controlled by the specified pick device type, +pick inclusion and pick exclusion attributes. +.LP +The supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +.PN PEXPickDeviceDCHitBox +is specified by a pick position and a pick +distance, both in device coordinates. The pick position is the +device coordinate center of the pick area and the shape of the pick area +is implementation-dependent (e.g. could be square, rectangular or circular). +The pick distance defines the half-width or radius of the pick area. +.PN PEXPickDeviceNPCHitVolume +is specified by two points in normalized projection coordinates. Primitives +that lie within or intersect the pick area or volume are considered "hit". +.LP +The pick method determines which "hit" primitives will be picked. For "pick +one", four standard pick methods are defined: +.PN PEXPickLast , +.PN PEXPickClosestZ , +.PN PEXPickVisibleAny +and +.PN PEXPickVisibleClosest . +For "pick all", two standard pick methods are defined: +.PN PEXPickAllAll +and +.PN PEXPickAllVisible . +The supported pick methods can be inquired by calling +.PN PEXGetEnumTypeInfo . +PEX servers are required to support at least +.PN PEXPickLast +and +.PN PEXPickAllAll . +.LP +The pick inclusion and exclusion filters specify the name sets to be used to +filter +primitives after a hit test rendering or traversal. The pick functions will +only return primitives which are not excluded by the pick filter. If possible, +pick one will return a primitive which most closely satisfies the pick criteria +and also passes the pick filter test. A flag is returned from pick one +functions to indicate whether a primitive which did not satisfy the pick filter +was a better candidate with the specified pick method. The dynamics of +the pick inclusion and exclusion filters can be determined by calling +.PN PEXGetRendererDynamics . +.LP +During a "pick one", at most one primitive is picked. If the pick method is +.PN PEXPickLast , +the last "hit" primitive which satisfies the pick filter test is returned. If +the pick method is +.PN PEXPickClosestZ , +the "hit" primitive which has a z value closest to the front clipping plane and +satisfies the pick filter is returned. If multiple primitives satisfy this +criteria, any of them may be returned. If the pick method is +.PN PEXPickVisibleAny , +any "hit" primitive which is visible (taking the current HLHSR mode into +account) and satisfies the pick filter test is returned. If the pick method is +.PN PEXPickVisibleClosest , +all "hit" primitives which are visible are first selected. Of those selected, +the one which is closest to the pick position and satisfies the pick filter test +is returned. If an NPC hit volume was specified, the pick position is the +center of the volume. The z-buffer contents may not be preserved when using +the "visible" pick methods. +.LP +The "visible" pick methods only return primitives which would be visible in +the pick aperture if they were rendered using the renderer's current HLHSR +mode. For example, if the HLHSR mode is set to +.PN PEXHLHSRZBuffer , +the pick method +.PN PEXPickClosestZ +may return a primitive which is occluded by another primitive which does not +satisfy the pick filter test. However, the pick method +.PN PEXPickVisibleAny +guarantees that the picked primitive is not occluded. +.LP +During a "pick all", multiple primitives may be picked. If the pick method is +.PN PEXPickAllAll , +the primitives (up to the maximum number of hits) which lie within or intersect +the hit box are returned. If the pick method is +.PN PEXPickAllVisible , +the primitives (up to the maximum number of hits) which are visible (taking +into account the current HLHSR mode) and lie within or intersect the hit box +are returned. A "pick first" can be accomplished by specifying the maximum +number of hits to be one. +.LP +"Pick all" is further controlled by the renderer's pick start path. The pick +start path indicates where to begin the next "pick all" and is bound at the +start of the "pick all" rendering or traversal. +.LP +If a drawable that is associated with a renderer is destroyed while +the renderer is performing a "pick one" or "pick all" hit test, an implicit +.PN PEXEndPickOne +or +.PN PEXEndPickAll +(whichever is appropriate) is performed by the server in order to return the +renderer to the +.PN PEXIdle +state. All subsequent output and traversal requests to the renderer are +ignored and no error is generated. +.LP +If a drawable that is associated with a renderer is destroyed or resized while +the renderer is performing a "pick one" or "pick all" hit test, the pick +operation is terminated and the renderer state is set to +.PN PEXIdle. +All subsequent output and traversal requests to the renderer are +ignored until the next +.PN PEXEndPickOne +or +.PN PEXEndPickAll +(whichever is appropriate) which will return a pick status of +.PN PEXAbortedPick +along with an empty pick path. +.LP +If a drawable that is associated with a renderer is moved, exposed or occluded +while the renderer is performing a "pick one" or "pick all" hit test, the +server will continue to process output commands and requests using the new +drawable attributes until the pick operation is explicitly or implicitly +terminated. +.bp +.XS +Function Descriptions +.XE +.SH +PEXBeginPickAll - Begin Renderer Pick All +.XS + PEXBeginPickAll +.XE +.IN "PEXBeginPickAll" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBeginPickAll\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^, long \fIstructure_id\fP\^, int \fImethod\fP\^, int \fIsend_event\fP\^, int \fImax_hits\fP\^, int \fIpick_device_type\fP\^, PEXPickRecord *\fIpick_record\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIstructure_id\fP 1i +A value to be used as the structure identifier for the root of the structure network. +.IP \fImethod\fP 1i +The pick all method +.Pn ( PEXPickAllAll +or +.PN PEXPickAllVisible ). +.IP \fIsend_event\fP 1i +.PN True +or +.PN False +- specifying whether the server should send an event when the maximum number of hits is reached. +.IP \fImax_hits\fP 1i +The maximum number of hits to be returned. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIpick_record\fP 1i +A pointer to the pick data record. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +This functions starts an immediate-mode pick, setting the renderer's renderer +state to +.PN PEXPicking . +When the renderer state is +.PN PEXPicking , +primitives are hit +tested instead of converted to pixels. +All picked primitives are +recorded until reaching the maximum hits specified is reached. +Additional picked primitives will not be recorded. Once the +the maximum number of hits is reached, subsequent primitives may be +ignored. +.LP +The supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +The specified structure identifier will be inserted as the first structure +component in the returned pick path(s). +.LP +If the send event flag is +.PN True , +and the pick method is +.PN PEXPickAllAll , +then a +.PN PEXMaxHitsReached +event is sent from the server to the client whenever the maximum number of +hits is reached by the server, +if the event is supported (see +.PN PEXGetImpDepConstants ). +Upon receiving the event, the application should stop sending primitives and +process the recorded hits. +If the pick method is +.PN PEXPickAllVisible , +a complete set of primitives must be sent to the server before determining +which primitives are picked. +.LP +If the specified drawable does not have the same root and depth as +the drawable used to create the renderer, or, if the +specified drawable is not one of the supported drawables returned +by +.PN PEXMatchRenderingTargets , +a match error is generated. +If the renderer state is set to +.PN PEXRendering +or +.PN PEXPicking +when this function is called, +then the operation in progress is aborted, the +.PN PEXBeginPickAll +function is completed, and a +.PN BadPEXRendererState +error returned. +.LP +All functions which process output commands or manipulate attributes (i.e. all +output command functions, +.PN PEXBeginStructure , +.PN PEXEndStructure , +.PN PEXRenderElements , +and +.PN PEXAccumulateState ) +can be called when the renderer state is +.PN PEXPicking . +They will have the same semantics except that primitives are hit tested instead +of converted to pixels. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.sp +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + PEXRenderer renderer; +} PEXMaxHitsReachedEvent; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources necessary to complete request. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.IP \fIBadValue\fP 1i +The pick record contains invalid data, or the pick device type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXEndPickAll , +.PN PEXPickAll , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXBeginPickOne - Begin Renderer Pick One +.XS + PEXBeginPickOne +.XE +.IN "PEXBeginPickOne" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBeginPickOne\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^, long \fIstructure_id\fP\^, int \fImethod\fP\^, int \fIpick_device_type\fP\^, PEXPickRecord *\fIpick_record\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIstructure_id\fP 1i +A value to be used as the structure identifier for the root of the structure network. +.IP \fImethod\fP 1i +The pick one method +.Pn ( PEXPickLast , +.PN PEXPickClosestZ , +.PN PEXPickVisibleAny , +.PN PEXPickVisibleClosest ). +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIpick_record\fP 1i +A pointer to the pick data record. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +This functions starts an immediate-mode pick, setting the renderer's renderer +state to +.PN PEXPicking . +When the renderer state is +.PN PEXPicking , +primitives will be hit +tested instead of converted to pixels. +For "pick one", a hierarchical path to the picked +primitive will be maintained. +.LP +Standard "pick one" methods are +.PN PEXPickLast , +.PN PEXPickClosestZ , +.PN PEXPickVisibleAny +and +.PN PEXPickVisibleClosest . +The supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +The specified structure identifier will be inserted as the first structure +component in the returned pick path. +.LP +If the specified drawable does not have the same root and depth as +the drawable that was used to create the renderer, or, if the +specified drawable is not one of the supported drawables returned by +.PN PEXMatchRenderingTargets , +a Match error will be generated. +If the renderer state is set to +.PN PEXRendering +or +.PN PEXPicking +when this function is called, +then the operation in progress is aborted, the +.PN PEXBeginPickOne +function is completed, and a +.PN BadPEXRendererState +error is sent. +.LP +All functions which process output commands or manipulate +attributes (i.e. all output command functions, +.PN PEXBeginStructure , +.PN PEXEndStructure , +.PN PEXRenderElements , +and +.PN PEXAccumulateState ) +can be called when the renderer state is +.PN PEXPicking . +They will have the same semantics except that primitives are hit tested instead +of converted to pixels. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources necessary to complete request. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.IP \fIBadValue\fP 1i +The pick record contains invalid data, or the pick device type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXEndPickOne , +.PN PEXPickOne +.RE +.bp +.SH +PEXFreePickPaths - Free Memory Allocated for Pick Paths +.XS + PEXFreePickPaths +.XE +.IN "PEXFreePickPaths" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePickPaths\^(\^unsigned long \fIcount\fP\^, PEXPickPath *\fIpick_paths\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of pick paths. +.IP \fIpick_paths\fP 1i +An array of pick paths. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXEndPickAll +and +.PN PEXPickAll . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXEndPickAll , +.PN PEXPickAll +.RE +.bp +.SH +PEXEndPickAll - End Pick All +.XS + PEXEndPickAll +.XE +.IN "PEXEndPickAll" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPickPath *PEXEndPickAll\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, int *\fIstatus_return\fP\^, int *\fImore_return\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIstatus_return\fP 1i +Returns the status of the pick operation. +.IP \fImore_return\fP 1i +Returns the status of remaining picks. +.IP \fIcount_return\fP 1i +Returns the number of pick paths. +.RE +.SH +Returns +.RS +.LP +An array of pick paths; a null pointer if unsuccessful or no pick (see also status_return). +.RE +.SH +Description +.RS +This function terminates an immediate-mode pick, +returns the hierarchical pick paths of any +hit primitives, and sets the renderer state to +.PN PEXIdle . +.LP +If one or more primitives were picked, a pick status of +.PN PEXPick +is returned along with the pick paths. The hierarchical pick path is equivalent +to the renderer's current path at the time the picked primitive was processed. +If no primitives were picked, the returned pick status is +.PN PEXNoPick , +and the returned pick paths is a null pointer. If the renderer's drawable +was destroyed or resized during the pick operation, the returned pick status +is +.PN PEXAbortedPick +and the returned pick paths is a null pointer. +.LP +If all hits were recorded then +.PN PEXNoMoreHits +is returned +and the renderer's pick start path will be empty. +If the maximum number of hits was reached and additional +hits were detected, then +.PN PEXMoreHits +is returned +and the renderer's pick start path will be set to the last recorded +hit primitive. +If, after reaching the maximum number of hits, +subsequent output commands were ignored, then +.PN PEXMayBeMoreHits +is returned and the renderer's pick start path +is set to the last element processed by the renderer before +it started ignoring primitives. +.LP +If the renderer state is +.PN PEXIdle +when this function is called, +(i.e., no picking is in progress or the rendering was aborted due to a resize), +the function is ignored and no error is generated. If the renderer state +is currently +.PN PEXRendering +or if the pick operation in progress is a "pick one", then +a +.PN BadPEXRendererState +error is sent. +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePickPaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginPickAll , +.PN PEXPickAll , +.PN PEXFreePickPaths +.RE +.bp +.SH +PEXEndPickOne - End Pick One +.XS + PEXEndPickOne +.XE +.IN "PEXEndPickOne" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPickPath *PEXEndPickOne\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, int *\fIstatus_return\fP\^, int *\fIundetectable_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIstatus_return\fP 1i +Returns the status of the pick operation. +.IP \fIundetectable_return\fP 1i +Returns +.PN True +or +.PN False +indicating whether another pick better satisfied the pick criteria with the exception that it did not pass the pick filter test. +.RE +.SH +Returns +.RS +.LP +A pointer to the pick path; a null pointer if unsuccessful or no pick (see also status_return). +.RE +.SH +Description +.RS +This function terminates an immediate-mode pick, +returns the hierarchical pick path to the +closest or last hit primitive, +and sets the renderer state to +.PN PEXIdle . +.LP +If a primitive was picked, the returned pick status is +.PN PEXPick . +If no primitive was picked, the returned pick status is +.PN PEXNoPick , +and the returned pick path is a null pointer. +If the renderer's drawable +was destroyed or resized during the pick operation, the returned pick status +is +.PN PEXAbortedPick +and the returned pick path is a null pointer. +.LP +If there was a primitive which more closely satisfied the pick criteria, but +did not pass the pick filter test, then the undetectable pick return status will +be +.PN True . +Otherwise, it will be +.PN False . +.LP +If the renderer state is currently +.PN PEXIdle +when this function is called, (i.e., no +picking is in progress or the rendering was aborted due to a resize), +the function is ignored and no error is generated. If the renderer state +is currently +.PN PEXRendering +or if the pick operation in progress is a "pick all", then +a +.PN BadPEXRendererState +error is sent. +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePickPaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginPickOne , +.PN PEXPickOne , +.RE +.bp +.SH +PEXPickAll - Pick All Traversal +.XS + PEXPickAll +.XE +.IN "PEXPickAll" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPickPath *PEXPickAll\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^, int \fImethod\fP\^, int \fImax_hits\fP\^, int \fIpick_device_type\fP\^, PEXPickRecord *\fIpick_record\fP\^, int *\fIstatus_return\fP\^, int *\fImore_return\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fImethod\fP 1i +The pick all method +.Pn ( PEXPickAllAll +or +.PN PEXPickAllVisible ). +.IP \fImax_hits\fP 1i +The maximum number of hits to be returned. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIpick_record\fP 1i +A pointer to the pick data record. +.IP \fIstatus_return\fP 1i +Returns the status of the pick operation. +.IP \fImore_return\fP 1i +Returns the status of remaining picks. +.IP \fIcount_return\fP 1i +Returns the number of pick paths. +.RE +.SH +Returns +.RS +.LP +An array of pick paths; a null pointer if unsuccessful or no pick (see also status_return). +.RE +.SH +Description +.RS +This function traverses the structure network specified +by the renderer's current pick start path. +Hit testing begins after the last element specified in the renderer's current +pick start path and continues until one of two conditions is met: the maximum +number of hits is reached, or the last element of the first structure in the +pick start path is processed. +If the pick start path +does not define a valid hierarchical path, a +.PN BadPEXPath +error is sent and a null pick path is returned. +.LP +Standard "pick all" methods are +.PN PEXPickAllAll +and +.PN PEXPickAllVisible . +The supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +If one or more primitives were picked, a pick status of +.PN PEXPick +is returned along with the pick paths. The hierarchical pick path is equivalent +to the renderer's current path at the time the picked primitive was processed. +If no primitives were picked, the returned pick status is +.PN PEXNoPick , +and the returned pick paths is a null pointer. If the renderer's drawable +was destroyed or resized during the pick operation, the returned pick status +is +.PN PEXAbortedPick +and the returned pick paths is a null pointer. +.LP +The paths of all hit primitives are recorded until reaching the maximum +number of hits or until the server maximum number of recordable hits is reached. +Once the maximum number +of paths is recorded, subsequent primitives may be ignored and the results +returned. +.LP +If all possible hits were recorded then +.PN PEXNoMoreHits +is returned +and the renderer's pick start path will be empty. +If the maximum number of hits was reached and additional +hits were detected, then +.PN PEXMoreHits +is returned and the renderer's pick start path will be set to the last +recorded hit primitive. +If, after reaching the maximum number of hits, +subsequent output commands were ignored, +then +.PN PEXMayBeMoreHits +is returned and the renderer's pick start path +will be set to the last element processed by the renderer before +it started ignoring primitives. +.LP +If the specified drawable does not have the same root and depth as +the drawable used to create the renderer, or, if the +specified drawable is not one of the supported drawables returned +by +.PN PEXMatchRenderingTargets , +a match error is generated. +If the renderer state is set to +.PN PEXRendering +or +.PN PEXPicking +when this function is called, +then the operation in progress is aborted, the +.PN PEXPickAll +function is completed, and a +.PN BadPEXRendererState +error returned. +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePickPaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources necessary to complete request. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.IP \fIBadPEXPath\fP 1i +The renderer pick start path is invalid. +.IP \fIBadValue\fP 1i +The pick record contains invalid data, or the pick device type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginPickAll , +.PN PEXEndPickAll , +.PN PEXFreePickPaths +.RE +.bp +.SH +PEXPickOne - Pick One Traversal +.XS + PEXPickOne +.XE +.IN "PEXPickOne" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPickPath *PEXPickOne\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXRenderer \fIrenderer\fP\^, PEXStructure \fIstructure\fP\^, int \fImethod\fP\^, int \fIpick_device_type\fP\^, PEXPickRecord *\fIpick_record\fP\^, int *\fIstatus_return\fP\^, int *\fIundetectable_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIrenderer\fP 1i +The resource identifier of the renderer. +.IP \fIstructure\fP 1i +The resource identifier for the root structure of the structure network. +.IP \fImethod\fP 1i +The pick one method +.Pn ( PEXPickLast , +.PN PEXPickClosestZ , +.PN PEXPickVisibleAny +.PN PEXPickVisibleClosest ). +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIpick_record\fP 1i +A pointer to the pick data record. +.IP \fIstatus_return\fP 1i +Returns the status of the pick operation. +.IP \fIundetectable_return\fP 1i +Returns +.PN True +or +.PN False +indicating whether another pick better satisfied the pick criteria with the exception that it did not pass the pick filter test. +.RE +.SH +Returns +.RS +.LP +A pointer to the pick path; a null pointer if unsuccessful or no pick (see also status_return). +.RE +.SH +Description +.RS +This function traverses the specified structure network. +.LP +Standard "pick one" methods are +.PN PEXPickLast , +.PN PEXPickClosestZ , +.PN PEXPickVisibleAny +and +.PN PEXPickVisibleClosest . +The supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +If a primitive was picked, the returned pick status is +.PN PEXPick . +If no primitive was picked, the returned pick status is +.PN PEXNoPick , +and the returned pick path is a null pointer. +If the renderer's drawable +was destroyed or resized during the pick operation, the returned pick status +is +.PN PEXAbortedPick +and the returned pick path is a null pointer. +.LP +If there was a primitive which more closely satisfied the pick criteria, but +did not pass the pick filter test, then the undetectable pick return status will +be +.PN True . +Otherwise, it will be +.PN False . +.LP +If the specified drawable does not have the same root and depth as +the drawable that was used to create the renderer, or, if the +specified drawable is not one of the supported drawables returned by +.PN PEXMatchRenderingTargets , +a Match error will be generated. +If the renderer state is set to +.PN PEXRendering +or +.PN PEXPicking +when this function is called, +then the operation in progress is aborted, the +.PN PEXPickOne +function is completed, and a +.PN BadPEXRendererState +error is sent. +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePickPaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources necessary to complete request. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or the specified renderer resource was +not created with a compatible drawable. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXRendererState\fP 1i +The specified renderer was in an invalid state. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The pick record contains invalid data, or the pick device type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXBeginPickOne , +.PN PEXEndPickOne +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter07 b/xc/doc/specs/PEX5/PEXlib/chapter07 new file mode 100644 index 000000000..188cfd4b0 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter07 @@ -0,0 +1,1864 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 7\fP\s-1 + +\s+1\fBStructures\fP\s-1 +.sp 2 +.nr H1 7 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 7: Structures +.XE +.IN "structures" +.LP +A structure is a resource which stores output commands for later execution. +Output commands stored in a structure are referred to as structure elements. +.IN "structure elements" +.IN "elements" "structure" +Structures can be shared by clients like any other X or PEX resource. +Structures can reference other structures; such a hierarchy of structures is +called a structure network. The first structure in a structure network is +called the root structure. +.IN "root structure" +.IN "structure" "root" +.LP +The two modifiable attributes in a structure resource are: +.ID +element pointer +editing mode +.DE +.LP +The following attributes of a structure can be inquired: +.ID +number of structure elements +length (in units of four bytes) +whether or not referenced by other structures +.DE +.LP +Create a structure resource by calling the +.PN PEXCreateStructure +function. +Add structure elements to existing structures +simply by calling output command functions with the appropriate structure +identifier and a +.PN PEXOCRequestType +of +.PN PEXOCStore . +.LP +Delete structure resources by calling the +.PN PEXDestroyStructures +function. +.PN PEXDestroyStructures +takes a list of structure resources to be deleted and +has the side effect of deleting all other structure elements which +reference any of the deleted structures. +.LP +.IN "element offset" +.IN "offset" "element, within a structure" +The position of an element within a structure is its offset from the start of +the structure. The first element of a structure has an offset of one. The last +element of a structure has an offset of n, where n is the total number of +elements within the structure. +Conceptually, a "null element" exists before the first element and +has an offset of zero. +.IN "null element" +.IN "element" "null" +.IN "element zero" +.LP +The element pointer contains an offset into the structure. When a structure is +first created, the element pointer has a value of zero. Many commands use the +element pointer value to fetch, store, or edit structure elements. PEXlib +contains a number of functions which modify the position of the element +pointer. These requests typically require a "{whence, offset}" pair. The element +pointer is positioned relative to the beginning of the structure (whence == +.PN PEXBeginning ), +relative to the current element pointer position (whence == +.PN PEXCurrent ), +or relative to the end of the structure (whence == +.PN PEXEnd ). +To obtain the absolute offset, the specified offset is added to +the position indicated by "whence". For functions which specify a range of +elements with two "{whence, offset}" pairs, the elements affected are those +between the two computed positions regardless of which position was specified +first and which was second. +.LP +.IN "label" +A label is a special structure element that allows convenient editing of a +structure. Labels are stored as structure elements and move with other +structure elements as elements are inserted or deleted before them in the +structure. The element pointer can be moved to a particular label or to the +next occurrence of a particular structure element within the structure. +.LP +.IN "insert mode" +An output command is inserted into a structure by setting the structure +editing mode to +.PN PEXStructureInsert +(the default), setting the element pointer to +the desired element offset, and calling the appropriate output command functions. +In insert mode, each output command sent to a structure +causes a structure element to be created and inserted after the +element specified by the element pointer. After each insertion, the element +pointer is updated to point to the newly-inserted element. +.LP +To illustrate a common case, the element pointer points to the last +element in a structure and structure elements are to be added to the end of the +structure. Each output command sent to this structure causes a structure +element to be added after the last element, and the element pointer is then +updated to point to the newly-inserted structure element. Therefore, multiple +output commands sent to a structure when the editing mode is +.PN PEXStructureInsert +result in an ordered list of structure elements being added to the structure. +.LP +.IN "replace mode" +Existing structure elements are overwritten by setting the editing mode of a +structure to +.PN PEXStructureReplace . +In replace mode, existing elements are deleted +and the new elements sent to the structure are created in their place. The +number of elements deleted is equal to n, where n is the number of elements +sent to the structure in a single request (unless there are fewer than n +elements between the +element pointer position and the end of the structure, in which case only those +between the element pointer position and the end of the structure are deleted). +If the range to be deleted includes offset 0 then n-1 elements are deleted from +the structure. The elements sent to the structure are then inserted in place +of the deleted elements. See also the introduction in +\fIChapter 2: Output Commands\fP. +.LP +It is not possible to set the element pointer to an offset greater than the +last element in the structure. This means at least one element is always +overwritten during a replace operation, unless the structure originally +contained no elements. The element pointer is left pointing to the last +inserted or replaced element in the structure. +.LP +Some structure editing commands can copy or delete a range of structure +elements. When elements are deleted, the element pointer is set to the +position immediately preceding the first element deleted. The offset of each +element after those deleted decreases by one for each element deleted. Deleting +element zero is effectively a no-op. A deletion operation includes the +elements at the boundaries of the deletion range. After the deletion occurs, +the element pointer is left pointing at the element preceding the deleted +range. +.LP +.IN "editing mode" +Copy operations ignore the editing mode of the destination structure; elements +are always inserted during copy operations. After a copy operation, the +destination structure's element pointer is left pointing at the last copied +element. Copying elements when the source and destination structure are the +same is also permitted. The semantics specify that the copy occurs as though +the elements in the copy range are first copied to a temporary area and then +inserted at the desired spot in the destination structure. +.LP +Other commands exist for dealing with structures. These include commands to +change all references to a structure, obtain the size of a structure, and +obtain information about the hierarchy of a structure network. Some of these +requests use the concept of an element reference path, which is an arbitrary +length list of structure id/element offset pairs. A structure element is +referenced with such a structure id/element offset pair. Since structures can +call other structures, it is helpful to know the organization of the +structure network. The element reference path is used to identify a unique +path through a structure network. +.LP +For instance, if structure "A" is the root of a structure network, +an element that lives at element offset 14 in structure "A" has +an element reference path equal to {"A":14}. If element 14 in structure +"A" is an execute structure command that references structure "B," element zero +in "B" has an element reference path of {"A":14, "B":0}. Since it +is possible that "B" is also referenced by other structures, there may be +alternative paths to the element "B":0. The depth of an element +reference path is the number of element references in the path. A path depth +of zero requests all unique paths leading to a particular element. +.bp +.XS +Function Descriptions +.XE +.SH +PEXChangeStructureRefs - Change Structure References +.SH +Synopsis +.XS + PEXChangeStructureRefs +.XE +.IN "PEXChangeStructureRefs" "" "@DEF@" +.RS +.FD 0 +void PEXChangeStructureRefs\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIold_structure\fP\^, PEXStructure \fInew_structure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIold_structure\fP 1i +The resource identifier of the structure no longer to be referenced. +.IP \fInew_structure\fP 1i +The resource identifier of the structure now referenced. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function changes "execute structure" elements in the server that +reference the specified old structure into +"execute structure" elements which reference the specified new structure. +Both structures must already exist as valid structure resources. +.LP +Any references to the new structure that existed before this +request are not affected. If there were references to the old structure +and the new structure does not exist, an error is returned +and no action is taken. +.LP +On all PHIGS workstation resources where the new structure is not already +posted and the old structure is posted, the new structure is posted with the +same priority as the old structure and the old structure is unposted. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.PN PEXGetStructureInfo , +.PN PEXGetStructuresInNetwork , +.br +.PN PEXGetAncestors , +.PN PEXGetDescendants +.RE +.bp +.SH +PEXCopyElements - Copy Elements +.XS + PEXCopyElements +.XE +.IN "PEXCopyElements" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyElements\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIsrc_structure\fP\^, int \fIsrc_whence1\fP\^, long \fIsrc_offset1\fP\^, int \fIsrc_whence2\fP\^, long \fIsrc_offset2\fP\^, PEXStructure \fIdst_structure\fP\^, int \fIdst_whence\fP\^, long \fIdst_offset\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIsrc_structure\fP 1i +The resource identifier of the source structure. +.IP \fIsrc_whence1\fP 1i +A value specifying, with src_offset1, the first limit of the range of elements to be copied +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIsrc_offset1\fP 1i +The offset from src_whence1 denoting the first limit of the range of elements to be copied. +.IP \fIsrc_whence2\fP 1i +A value specifying, with src_offset2, the second limit of the range of elements to be copied +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIsrc_offset2\fP 1i +The offset from src_whence2 denoting the second limit of the range of elements to be copied. +.IP \fIdst_structure\fP 1i +The resource identifier of the destination structure. +.IP \fIdst_whence\fP 1i +A value specifying, with dst_offset, the position at which the elements +are inserted into the destination structure +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIdst_offset\fP 1i +The offset from dst_whence denoting the position at which the elements +are inserted into the destination structure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies a range of elements from the specified source structure +to the specified destination structure. +.LP +If a computed offset is less than zero, it is set to +zero before obtaining the element information. If a +computed offset is greater than the number of elements in the +structure, the offset is set to the offset of the last element in the +structure. +.LP +The source structure and destination structure can +be the same. In this case, the copy operation proceeds +as though the indicated range were copied to a temporary location +and then inserted relative to the destination position. +.LP +After the copy operation, the element pointer of the destination +structure is updated to point at the last element copied +into the destination structure. The editing mode attribute of +the destination structure is ignored during this request. The copied +elements are always inserted into the destination structure +and are never used to replace existing structure elements. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXCopyStructure - Copy Structure +.XS + PEXCopyStructure +.XE +.IN "PEXCopyStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyStructure\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIsrc_structure\fP\^, PEXStructure \fIdst_structure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIsrc_structure\fP 1i +The resource identifier of the source structure. +.IP \fIdst_structure\fP 1i +The resource identifier of the destination structure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies elements in the source structure to +the destination structure. Both structures must already +exist as valid structure resources. Elements already in +the destination structure are overwritten. +The element pointer and editing mode attributes of the source structure +are copied to the destination structure as well. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXCreateStructure - Create Structure +.XS + PEXCreateStructure +.XE +.IN "PEXCreateStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXStructure PEXCreateStructure\^(\^Display *\fIdisplay\fP\^) +.FN +.RE +.SH +Argument +.RS +.LP +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created structure resource. +.RE +.SH +Description +.RS +.LP +This function creates a structure resource and returns the resource identifier +of the created structure. The returned identifier is used to +refer to the created structure resource. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.RE +.SH +See Also +.RS +.LP +.PN PEXDestroyStructures +.RE +.bp +.SH +PEXDeleteBetweenLabels - Delete Elements Between Labels +.XS + PEXDeleteBetweenLabels +.XE +.IN "PEXDeleteBetweenLabels" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXDeleteBetweenLabels\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, long \fIlabel1\fP\^, long \fIlabel2\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIlabel1\fP 1i +The first label. +.IP \fIlabel2\fP 1i +The second label. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes a range of elements from the specified structure. +Elements between the two labels are deleted. +The label elements are not deleted. A search for the first +label is performed starting at the current offset plus one. +A search for the second label is performed starting at the element following +the first label. After the deletion operation, the structure element +pointer is set to the pointer position at the first label. +.LP +If either of the two labels is not found between the starting point of the +search and the end of the structure, no deletion occurs and the structure's +element point is left unchanged. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLabel\fP 1i +The specified label does not exist. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXLabel +.RE +.bp +.SH +PEXDeleteElements - Delete Elements +.XS + PEXDeleteElements +.XE +.IN "PEXDeleteElements" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXDeleteElements\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence1\fP 1i +A value specifying, with offset1, the first limit of the range of elements to be deleted +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset1\fP 1i +The offset from whence1 denoting the first limit of the range of elements to be deleted. +.IP \fIwhence2\fP 1i +A value specifying, with offset2, the second limit of the range of elements to be deleted +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset2\fP 1i +The offset from whence2 denoting the second limit of the range of elements to be deleted. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes a range of elements from the structure specified by +structure. +.LP +If a computed offset is less than zero, it is set to +zero before obtaining the element information. If a +computed offset is greater than the number of elements in the +structure, the offset is set to the offset of the last structure element +in the structure. Deleting the null element is effectively +a no-op. After the deletion operation, the structure element +pointer is set to the element immediately preceding the range +of deleted elements. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXDeleteToLabel - Delete Elements to Label +.XS + PEXDeleteToLabel +.XE +.IN "PEXDeleteToLabel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXDeleteToLabel\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence\fP\^, long \fIoffset\fP\^, long \fIlabel\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence\fP 1i +A value specifying, with offset, the beginning of the range of elements to be deleted +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset\fP 1i +The offset from whence denoting the beginning of the range of elements to be deleted. +.IP \fIlabel\fP 1i +The label specifying the end of the range of elements to be deleted. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes a range of elements between a computed offset and a +specified label in the specified structure. +The computed offset specifies the beginning of the +deletion range. The label specifies the end of the deletion +range. Elements are deleted from the structure element immediately +after the computed offset up to the next occurrence of the label. +The label is not deleted. If label is not found, no +elements are deleted. +.LP +If the computed offset is less than zero, it is set to zero +before the deletion occurs. If the computed offset is greater +than the number of elements in the structure, the offset is set to the +offset of the last structure element. Deleting the zero +element is effectively a no-op. After the deletion operation, +the structure element pointer is set to the element immediately +preceding the range of deleted elements. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLabel\fP 1i +The specified label does not exist. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXLabel +.RE +.bp +.SH +PEXDestroyStructures - Destroy Structures +.XS + PEXDestroyStructures +.XE +.IN "PEXDestroyStructures" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXDestroyStructures\^(\^Display *\fIdisplay\fP\^, unsigned long \fIcount\fP\^, PEXStructure *\fIstructures\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcount\fP 1i +The number of structure resource identifiers. +.IP \fIstructures\fP 1i +An array of resource identifiers of the structures to be destroyed. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes each structure in the list of structure identifiers, +removes all references to it in the server, and +frees all memory associated with it. +.LP +This function also removes any "execute structure" structure elements +that reference a structure in the list and unposts any structure in +the list from a PHIGS workstation resource to which it is posted. +If a structure has any structure elements removed from it as a result +of this call, its element pointer will continue to point at the same +structure element. However, if the structure element being pointed +at is removed, the element pointer will be positioned at the previous +structure element. +.LP +Any paths in search contexts or pick measures that contain references +to a deleted structure may still be inquired. +However, if a path in a search context or pick measure resource which +contains a destroyed structure resource identifier is later used in a +.PN PEXSearchNetwork +or +.PN PEXUpdatePickMeasure +function, a path error is generated. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXGetStructuresInNetwork , +.PN PEXGetAncestors , +.br +.PN PEXGetDescendants , +.PN PEXChangeStructureRefs +.RE +.bp +.SH +PEXElementSearch - Element Search +.XS + PEXElementSearch +.XE +.IN "PEXElementSearch" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXElementSearch\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence\fP\^, long \fIoffset\fP\^, int \fIdirection\fP\^, unsigned long \fIincl_count\fP\^, unsigned short *\fIincl_list\fP\^, unsigned long \fIexcl_count\fP\^, unsigned short *\fIexcl_list\fP\^, unsigned long *\fIelem_offset_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence\fP 1i +A value specifying, with offset, the offset at which the search is to begin +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset\fP 1i +The offset from whence at which the search is to begin. +.IP \fIdirection\fP 1i +The direction of the search +.Pn ( PEXForward +or +.PN PEXBackward ). +.IP \fIincl_count\fP 1i +The number of values in inclusion array. +.IP \fIincl_list\fP 1i +An array of short integers specifying structure elements to be searched for. +.IP \fIexcl_count\fP 1i +The number of values in exclusion array. +.IP \fIexcl_list\fP 1i +An array of short integers specifying structure elements not to be searched for. +.IP \fIelem_offset_return\fP 1i +Returns the offset of the element located by the search. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +The non-zero value will be either +.PN PEXFound +or +.PN PEXNotFound +depending upon the result of the search. +.RE +.SH +Description +.RS +.LP +This function searches for the first occurrence of the specified +element type in the specified structure. +The search always includes the starting element. +.LP +If the computed offset is less than zero, it is set to zero before +the search is performed. If the computed offset is greater than +the number of elements in the structure, it is set to the offset +of the last structure element in the structure. +.LP +An element is selected if its element type is contained in +inclusion list and is not contained in exclusion list. +An element type of +.PN PEXOCAll +causes all element types to match. If a structure element +type is in both the inclusion and exclusion list, it is excluded. +.LP +The search terminates if a match is found or if the limits of the +structure are reached. The search progresses from the start point +in the specified direction +.Pn ( PEXForward +or +.PN PEXBackward ). +This is a non-descending search; that is, the +search does not include any structures referenced by "execute +structure" elements. If the search finds a match, a return status of +.PN PEXFound +and the offset of the matching element is returned. +If the search is unsuccessful, a return status of +.PN PEXNotFound +is returned. +.LP +The element pointer position of structure is not changed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence or direction parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXFetchElements - Fetch Elements +.XS + PEXFetchElements +.XE +.IN "PEXFetchElements" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXFetchElements\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^, int \fIfloat_format\fP\^, unsigned long *\fIcount_return\fP\^, unsigned long *\fIlength_return\fP\^, char **\fIocs_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence1\fP 1i +A value specifying, with offset1, the first limit of the range of elements to be fetched +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset1\fP 1i +The offset from whence1 denoting the first limit of the range of elements to be fetched. +.IP \fIwhence2\fP 1i +A value specifying, with offset2, the second limit of the range of elements to be fetched +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset2\fP 1i +The offset from whence2 denoting the second limit of the range of elements to be fetched. +.IP \fIfloat_format\fP 1i +The floating point format to use when formatting the output commands to be fetched +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIcount_return\fP 1i +Returns the number of output commands returned. +.IP \fIlength_return\fP 1i +Returns the length, in bytes, of the output commands fetched. +.IP \fIocs_return\fP 1i +Returns a pointer to protocol-formatted output commands (structure elements). +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function fetches a range of structure elements from the specified +structure. +.LP +If either computed offset is less than zero, it is set to +zero before fetching the structure elements. If either +computed offset is greater than the number of elements in the +structure, it is set to the offset of the last structure element +in the structure. The element pointer attribute of structure +is not affected by this command. No information will be returned for inquiries +on element offset zero. +.LP +An null pointer is returned is the requested floating point format is not +supported. +.LP +Any text or annotation text output commands returned will be formatted as +encoded text or encoded annotation text. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXFloatingPointFormat\fP 1i +The specified floating point format is invalid or unsupported. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.br +.PN PEXDecodeOCs , +.PN PEXEncodeOCs , +.PN PEXSendOCs +.RE +.bp +.SH +PEXFetchElementsAndSend - Fetch Elements and Send to Display +.XS + PEXFetchElementsAndSend +.XE +.IN "PEXFetchElementsAndSend" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXFetchElementsAndSend\^(\^Display *\fIsrc_display\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^, Display *\fIdst_display\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIsrc_display\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence1\fP 1i +A value specifying, with offset1, the first limit of the range of elements to be fetched +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset1\fP 1i +The offset from whence1 denoting the first limit of the range of elements to be fetched. +.IP \fIwhence2\fP 1i +A value specifying, with offset2, the second limit of the range of elements to be fetched +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset2\fP 1i +The offset from whence2 denoting the second limit of the range of elements to be fetched. +.IP \fIdst_display\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output commands +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function is like +.PN PEXFetchElements +except that the list of output commands are not returned to the application +but are sent directly to the specified destination display. +.LP +Calling this function is similar to calling +.PN PEXFetchElements , +and then sending the returned list of output commands by calling +.PN PEXStartOC , +.PN PEXCopyBytesToOC +and +.PN PEXFinishOC . +.LP +If the destination display does not support the same floating point format +as the format PEXlib is using with the source display, and if PEXlib can not +convert to a format supported by the destination display, the function will +return unsuccessfully. +.LP +Sending output commands to a structure whose editing mode is +.PN PEXStructureReplace , +is not really useful. The behavior will be unpredictable +unless a request type of +.PN PEXOCStoreSingle +is used. And, if the request type is +.PN PEXOCStoreSingle , +each output command will simply replace the previous one sent. +Applications should ensure that the structure's editing mode is +.PN PEXStructureInsert , +when sending multiple output commands. If it is intended to replace multiple +elements, the application can delete those elements first, and then insert the +new ones. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFetchElements +.RE +.bp +.SH +PEXFreeStructurePaths - Free Structure Paths Memory +.XS + PEXFreeStructurePaths +.XE +.IN "PEXFreeStructurePaths" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeStructurePaths\^(\^unsigned long \fIcount\fP\^, PEXStructurePath *\fIpaths\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of structure paths. +.IP \fIpaths\fP 1i +An array of structure paths. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetAncestors , +.PN PEXGetDescendants , +and +.PN PEXSearchNetwork . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetAncestors , +.PN PEXGetDescendants , +.PN PEXSearchNetwork . +.RE +.bp +.SH +PEXGetAncestors - Get Ancestors +.XS + PEXGetAncestors +.XE +.IN "PEXGetAncestors" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXStructurePath *PEXGetAncestors\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIpath_part\fP\^, unsigned long \fIpath_depth\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIpath_part\fP 1i +The part of the path to return +.Pn ( PEXTopPart +or +.PN PEXBottomPart ). +.IP \fIpath_depth\fP 1i +The maximum number of structure network path levels +to be returned in each path found. +.IP \fIcount_return\fP 1i +Returns the number of paths found. +.RE +.SH +Returns +.RS +.LP +An array of structure paths defining the ancestors of the specified structure; +a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns a list of structure network paths which reference the +specified structure. +Paths are returned as lists of element references, each of which is represented +as a structure resource identifier and an offset that gives the element's +position in the structure. Only unique paths are returned; in other words there +will be no duplicates in the list of returned paths. +.LP +The path part must be either +.PN PEXTopPart , +which requests that the top of +the structure paths be returned, or +.PN PEXBottomPart , +which +requests that the bottom of the structure paths be returned. +.LP +The path depth specifies the maximum number of element references +to be returned in each path. If the path depth is 0, the entire +path is returned. If the path depth is 1, only one element +reference is returned for each path. A path depth of 2 returns two +elements, and so on. +.LP +Specifying a path depth of 0 and a path part of +.PN PEXTopPart +returns the unique top parts of all paths to structure. +Specifying a path depth of 1 and a path part of +.PN PEXTopPart +returns the root structure of all +structure networks which contain structure. +A path depth of 2 and path part of +.PN PEXBottomPart +returns all of +the structure's immediate ancestors. Determine the number +of references to structure by setting +the path depth to 1 and the path part to +.PN PEXBottomPart . +.LP +PEXlib allocates memory for the returned ancestor information. +.PN PEXFreeStructurePaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for path part is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXGetStructuresInNetwork , +.PN PEXGetDescendants +.RE +.bp +.SH +PEXGetDescendants - Get Descendants +.XS + PEXGetDescendants +.XE +.IN "PEXGetDescendants" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXStructurePath *PEXGetDescendants\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIpath_part\fP\^, unsigned long \fIpath_depth\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIpath_part\fP 1i +The part of the path to return +.Pn ( PEXTopPart +or +.PN PEXBottomPart ). +.IP \fIpath_depth\fP 1i +The maximum number of structure network path levels +to be returned in each path found. +.IP \fIcount_return\fP 1i +Returns the number of paths found. +.RE +.SH +Returns +.RS +.LP +An array of structure paths defining the descendants of the specified structure; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns a list of structure network paths referenced by the +specified structure. +The elements of the returned array are of type +.PN PEXStructurePath . +Paths are returned as lists of element references, each of which is represented +as a structure resource identifier and an offset that gives the element's +position in the structure. Only unique paths are returned; in other words, +there will be no duplicates in the returned paths. +.LP +The path part must be either +.PN PEXTopPart , +which requests that the top of +the structure paths be returned, or +.PN PEXBottomPart , +which +requests that the bottom of the structure paths be returned. +.LP +The path depth specifies the maximum number of element references +to be returned in each path. If the path depth is 0, the entire +path is returned. If the path depth is 1, only one element +reference is returned for each path, and so on. +.LP +For instance, specifying a path depth of 0 and a path part of +.PN PEXTopPart +returns all paths from structure to leaf nodes in the structure +network tree in the order they would be traversed. +Specifying a path depth of 1 and a path part of +.PN PEXBottomPart +determines the bottom-most structures of the structure network +rooted at structure. +.LP +PEXlib allocates memory for the returned descendant information. +.PN PEXFreeStructurePaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for path part is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXGetStructuresInNetwork , +.PN PEXGetAncestors +.RE +.bp +.SH +PEXGetElementInfo - Get Element Information +.XS + PEXGetElementInfo +.XE +.IN "PEXGetElementInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetElementInfo\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^, int \fIfloat_format\fP\^, unsigned long *\fIcount_return\fP\^, PEXElementInfo **\fIinfo_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence1\fP 1i +A value specifying, with offset1, the first limit of the range of queried elements +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset1\fP 1i +The offset from whence1 denoting the first limit of the range of queried elements. +.IP \fIwhence2\fP 1i +A value specifying, with offset2, the second limit of the range of elements to be queried +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset2\fP 1i +The offset from whence2 denoting the second limit of the range of elements to be queried. +.IP \fIfloat_format\fP 1i +The floating point format to use when computing element sizes +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIcount_return\fP 1i +Returns the number element info records returned. +.IP \fIinfo_return\fP 1i +Returns an array of element info records describing the elements in the specified range. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns information about a range of elements from the +specified structure. +.LP +If a computed offset is less than zero it is set to +zero before obtaining the element information. If a +computed offset is greater than the number of elements in the +structure, it is set to the offset of the last structure element +in the structure. The element pointer attribute of structure +is not affected by this command. +.LP +Information returned about the list of inquired elements +includes the type of each element and its size. +The size of each element is based upon the specified floating point format. +No information is returned for inquires on element offset zero. +The element pointer is not affected by this function. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.sp +typedef struct { + unsigned short type; + unsigned short length; +} PEXElementInfo; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXFloatingPointFormat\fP 1i +The specified floating point format is invalid or unsupported. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXGetStructureInfo - Get Structure Information +.XS + PEXGetStructureInfo +.XE +.IN "PEXGetStructureInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetStructureInfo\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIfloat_format\fP\^, unsigned long \fIvalue_mask\fP\^, PEXStructureInfo *\fIinfo_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIfloat_format\fP 1i +The floating point format to use when computing element sizes +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIvalue_mask\fP 1i +A mask indicating which values to return. +.IP \fIinfo_return\fP 1i +Returns information about the structure resource. +.RE +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns information about the specified structure resource. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXElementPtr +.PN PEXNumElements +.PN PEXLengthStructure +.PN PEXHasRefs +.PN PEXEditMode +.DE +.LP +The length of the structure is given in the number of 4-byte units, and is +based upon the specified floating point format. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.sp +typedef struct { + unsigned long element_count; + unsigned long size; + Bool has_refs; + unsigned short edit_mode; + unsigned long element_pointer; +} PEXStructureInfo; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXFloatingPointFormat\fP 1i +The specified floating point format is invalid or unsupported. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXGetStructuresInNetwork - Get Structures in Network +.XS + PEXGetStructuresInNetwork +.XE +.IN "PEXGetStructuresInNetwork" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXStructure *PEXGetStructuresInNetwork\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhich\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the root structure in the +structure network. +.IP \fIwhich\fP 1i +A value indicating which structure resource identifiers to return +.Pn ( PEXAll +or +.PN PEXOrphans ). +.IP \fIcount_return\fP 1i +Returns the number of structure resource identifiers returned. +.RE +.SH +Returns +.RS +.LP +An array of structure resource identifiers; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns a list of unique structure resource identifiers that are +referenced in the structure network rooted at the specified structure. +.PN PEXAll +indicates that identifiers of all +structure resources referenced in the structure network +are returned. +.PN PEXOrphans +indicates that identifiers returned are those +not referenced by any structures outside of those in the +specified structure network. +.LP +The specified structure identifier will always be returned in the list, unless +it is an invalid structure identifier, in which case the returned list will +empty. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for which parameter is invalid +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXGetAncestors , +.PN PEXGetDescendants +.RE +.bp +.SH +PEXSetEditingMode - Set Structure Editing Mode +.XS + PEXSetEditingMode +.XE +.IN "PEXSetEditingMode" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetEditingMode\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fImode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fImode\fP 1i +The editing mode +.Pn ( PEXStructureInsert +or +.PN PEXStructureReplace ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the editing mode for the structure +specified. The editing mode specifies how editing operations +affect the structure. +If the editing mode is +.PN PEXStructureInsert , +subsequent requests to create structure +elements cause elements to be inserted into the structure. +The element pointer is then incremented by the number of elements +inserted. If the editing mode is +.PN PEXStructureReplace , +output requests that create structure elements cause +structure elements to replace elements, starting at the location +specified by the element pointer. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for mode is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXSetElementPtr - Set Structure Element Pointer +.XS + PEXSetElementPtr +.XE +.IN "PEXSetElementPtr" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetElementPtr\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence\fP\^, long \fIoffset\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIwhence\fP 1i +A value specifying with offset, the element pointer position +.Pn ( PEXBeginning , +.PN PEXCurrent , +.PN PEXEnd ). +.IP \fIoffset\fP 1i +The offset from whence which specifies the element pointer position. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the element pointer for the structure specified +to the position specified. +.LP +If either computed offset is less than zero, it is set to +zero before obtaining the element information. If either +computed offset is greater than the number of elements in the +structure, it is set to the offset of the last structure +element in the structure. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for whence parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure +.RE +.bp +.SH +PEXSetElementPtrAtLabel - Set Structure Element Pointer at Label +.XS + PEXSetElementPtrAtLabel +.XE +.IN "PEXSetElementPtrAtLabel" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetElementPtrAtLabel\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, long \fIlabel\fP\^, long \fIoffset\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIlabel\fP 1i +The value of the label. +.IP \fIoffset\fP 1i +The offset from the label. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the element pointer for the specified structure +at a position denoted by the label. A search is conducted for +the next occurrence of the label, +starting at the current element pointer position plus +one and proceeding in the forward direction. If label is +found, the element pointer for the structure is set to the +location of the label plus the value of the specified +offset. If label is not found, the structure's element +pointer is left unchanged. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXLabel\fP 1i +The specified label does not exist. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateStructure , +.PN PEXLabel +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter08 b/xc/doc/specs/PEX5/PEXlib/chapter08 new file mode 100644 index 000000000..49ed6b5d1 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter08 @@ -0,0 +1,373 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 8\fP\s-1 + +\s+1\fBName Sets\fP\s-1 +.sp 2 +.nr H1 8 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 8: Name Sets +.XE +.IN "name sets" +.LP +A name set is a PEX resource which maintains a set of identifiers +called names. A name set allows conditional treatment of output primitives +during rendering, picking, and structure searching operations. +.LP +Search contexts and pick measures also have attributes that are name set +resource identifiers. +.LP +Renderer resources and PHIGS workstation resources each have a name set +attribute considered as the current name set. The contents of the current name +set cannot be directly modified or queried in the PHIGS workstation resource. +The name set used in a renderer resource is set through the pipeline +context resource that provides the initial state for the renderer. There are +output commands that cause identifiers to be added to or removed from this name +set. Thus, as a structure traversal or series of output commands is executed, +the contents of the current name set can fluctuate. +.LP +.IN "filters" +Special filters are built into renderer, search context, pick measure, and +PHIGS workstation resources. These filters consist of a pair of name set +resource identifiers, one of which is considered as the "inclusion set" and the other +which is considered as the "exclusion set". Both are provided +because sometimes it is easier to specify what passes the filter test, +while other times it is easier to specify what does not pass the filter test. +.LP +The filtering criteria is successfully met if, when an output +primitive command is executed, the inclusion name set contains at least +one name contained in the current name set, and exclusion name set does not +contain any names in the current name set. If a name +is contained in both the inclusion set and the exclusion set, it is +considered to be only in the exclusion set. +.LP +Conditional operations that are supported with name sets include +highlighting, treating primitives as though they were invisible, and ignoring +certain primitives when searching through a structure network or performing +a picking operation. +.LP +The user can render the scene in different ways by modifying the +highlighting inclusion and exclusion sets and retraversing the structure +network. If the highlighting inclusion and exclusion sets are empty when +the structure network is traversed, the scene is drawn as normal. +If the user calls +.PN PEXChangeNameSet +to add "antique" to +the highlighting inclusion set, all of the "antique" objects are +highlighted the next time the structure network is traversed. If the user +adds "wooden" to the highlighting inclusion set, all "wooden" objects +and all "antique" objects are highlighted. If "wooden" is added +to the highlighting exclusion set instead, all objects that are "antique" +but not "wooden" are highlighted. +.LP +The only attribute in a name set is a list of names. For performance reasons, +the set of available names can be limited by an implementation. (See +.PN PEXGetImpDepConstants .) +PEXlib includes functions to create, copy, free, +query, and modify name sets. +.bp +.XS +Function Descriptions +.XE +.SH +PEXChangeNameSet - Change Name Set +.XS + PEXChangeNameSet +.XE +.IN "PEXChangeNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXChangeNameSet\^(\^Display *\fIdisplay\fP\^, PEXNameSet \fInameset\fP\^, int \fIaction\fP\^, unsigned long \fIcount\fP\^, PEXName *\fInames\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fInameset\fP 1i +The resource identifier of the name set. +.IP \fIaction\fP 1i +Type of change to be made +.Pn ( PEXNSAdd , +.PN PEXNSRemove , +.PN PEXNSReplace ). +.IP \fIcount\fP 1i +The number of names. +.IP \fInames\fP 1i +An array of names. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function modifies the specified name set resource. The list of names +is added to the name set if the specified action is +.PN PEXNSAdd , +removed from the name set if the specified action is +.PN PEXNSRemove , +or used to replace the names currently in the name set if the specified action is +.PN PEXNSReplace . +If requested to remove a name that does not exist, it is silently ignored. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXNameSet; +typedef unsigned long PEXName; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for action parameter is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet , +.PN PEXGetNameSet +.RE +.bp +.SH +PEXCopyNameSet - Copy Name Set +.XS + PEXCopyNameSet +.XE +.IN "PEXCopyNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyNameSet\^(\^Display *\fIdisplay\fP\^, PEXNameSet \fIsrc_nameset\fP\^, PEXNameSet \fIdst_nameset\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIsrc_nameset\fP 1i +The resource identifier of the source name set. +.IP \fIdst_nameset\fP 1i +The resource identifier of the destination name set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies the contents of the source name set to the +destination name set. Both must already exist as valid +name set resources. All values already in the destination name set are +overwritten. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet +.RE +.bp +.SH +PEXCreateNameSet - Create Name Set +.XS + PEXCreateNameSet +.XE +.IN "PEXCreateNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXNameSet PEXCreateNameSet\^(\^Display *\fIdisplay\fP\^) +.FN +.RE +.SH +Argument +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created name set. +.RE +.SH +Description +.RS +.LP +This function creates a name set resource and returns the resource +identifier of the created name set. The returned identifier is +used to refer to the created name set. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeNameSet +.RE +.bp +.SH +PEXFreeNameSet - Free Name Set +.XS + PEXFreeNameSet +.XE +.IN "PEXFreeNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeNameSet\^(\^Display *\fIdisplay\fP\^, PEXNameSet \fInameset\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fInameset\fP 1i +The resource identifier of the name set. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the association between the name set resource +identifier and the name set. The name set +is freed when no other resource references it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet +.RE +.bp +.SH +PEXGetNameSet - Get Name Set +.XS + PEXGetNameSet +.XE +.IN "PEXGetNameSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetNameSet\^(\^Display *\fIdisplay\fP\^, PEXNameSet \fInameset\fP\^, unsigned long *\fIcount_return\fP\^, PEXName **\fInames_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fInameset\fP 1i +The resource identifier of the name set to be queried. +.IP \fIcount_return\fP 1i +Returns the number of names. +.IP \fInames_return\fP 1i +Returns an array of names. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful; non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the names in the specified name set. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXNameSet; +typedef unsigned long PEXName; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateNameSet , +.PN PEXChangeNameSet +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter09 b/xc/doc/specs/PEX5/PEXlib/chapter09 new file mode 100644 index 000000000..6a478a8bc --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter09 @@ -0,0 +1,725 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 9\fP\s-1 + +\s+1\fBSpatial Searches\fP\s-1 +.sp 2 +.nr H1 9 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 9: Spatial Searches +.XE +.LP +The functions described in this chapter allow for spatial searches of +structure networks. The portion of the structure network to be searched +is specified, and a set of filters much like the invisibility and +highlight filters are specified to limit the set of eligible primitives. +A search distance is also specified. The first output primitive that +satisfies the filter criteria and is within the search distance is returned. +.NH 2 +Search Context +.XS +\*(SN Search Contexts +.XE +.LP +A search context is a PEX resource that contains all the search criteria +to be used when spatially searching a structure network. Two of the +attributes that specify search criteria contain name set resource identifiers. +If name sets are created, bound to a search context, then freed, the +contents of the name sets will remain, since they are still referenced by the +search context. However, if the search context is queried, the value +.PN PEXAlreadyFreed +will be returned for any such freed name sets, since they no longer have +valid resource identifiers by which they can be referenced. +.LP +A search context resource contains the following attributes: +.ID +Search position +Search distance +Search ceiling +Model clip flag +Start path +Normal list +Inverted list +.DE +.LP +The search position +attribute specifies the search reference position in world coordinates. +.LP +The search distance +attribute specifies a distance from the search reference position in +world coordinates. +The distance specifies a search aperture. Whether the aperture is considered +to be a sphere or a cube is implementation-dependent. +If the search distance is less than or equal to zero, a primitive +must intersect the search position to be considered within the +search aperture. +.LP +The search ceiling +attribute defines the ceiling of the search operation. +The search ceiling is an index into the list of element references +contained in the search start path. +Index one refers to the first path element in the list. +Searching stops when the end of the structure specified by +the search ceiling is reached. +If the ceiling is one, the search effectively operates without +a ceiling and terminates at the end of the first structure in the start path. +.LP +The model clip flag specifies whether modeling clipping must be performed +during the search operations. If +.PN True , +modeling clipping is performed using the modeling clipping attributes as +they are encountered during the search traversal. If +.PN False , +no model clipping is performed and model clipping attributes encountered +during the traversal are effectively ignored. +.LP +The start path attribute +defines the structure network path used as the starting point for the search. +The search traversal begins at the element following the one +indicated by the start path. +.LP +The normal list is a +list of name set resource identifier pairs. Each pair of name sets is considered +to be a filter to be used in the search traversal. A primitive's name +set attribute must have at least one name in common with the inclusion +name set of each filter, and must have no names in common with the +exclusion name set of each filter, to be eligible for the search. +.LP +The inverted list is a +list of name set resource identifier pairs. Each pair of name sets is considered +to be a filter that is inverted and used in the search traversal. A +primitive's name set attribute must have no names in common with the +inclusion name set of each inverted filter, or must have at least one name +in common with the exclusion name set of each inverted filter, to be +eligible for the search. +.LP +The +.PN PEXSearchNetwork +function is used to perform a search operation +once all of the search criteria attributes have been established. +To search, the structure network specified is conceptually traversed, +starting at the element following the element specified by the +start path. +Each output primitive is transformed to world coordinates and +compared against the search aperture to determine proximity. +For text and annotation text primitives, only the transformed origin of the +text string is used to determine proximity. If +.IN "text" "spatial searches" +.IN "annotation text" "spatial searches" +the transformed primitive's geometry places it within the search aperture, +its name set attribute is checked against the normal list and against the +inverted list to determine eligibility. +.LP +The search is successful if an output primitive is found which satisfies +the search filter criteria and is withing the search aperture. The path +to the first such primitive found is returned, and the start path +attribute of the search context is set to the found path. This allows +the next search operation on the same search context to continue from just +after the found primitive. +.LP +If no such primitive is found before the end of the structure indicated by the +search ceiling is reached, the search is unsuccessful, NULL is returned +as the found path, and the start path attribute is not changed. +.LP +.bp +.XS +Function Descriptions +.XE +.SH +PEXChangeSearchContext - Change Search Context +.XS + PEXChangeSearchContext +.XE +.IN "PEXChangeSearchContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXChangeSearchContext\^(\^Display *\fIdisplay\fP\^, PEXSearchContext \fIcontext\fP\^, unsigned long \fIvalue_mask\fP\^, PEXSCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the search context. +.IP \fIvalue_mask\fP 1i +A mask indicating the search context attributes to be changed. +.IP \fIvalues\fP 1i +A pointer to new values for the specified search context attributes. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function modifies the attributes of the specified search context resource. +The value mask indicates which values are specified. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXSCPosition +.PN PEXSCDistance +.PN PEXSCCeiling +.PN PEXSCModelClipFlag +.PN PEXSCStartPath +.PN PEXSCNormalList +.PN PEXSCInvertedList +.DE +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXSearchContext; +.sp +typedef struct { + PEXCoord position; + float distance; + unsigned short ceiling; + Bool model_clip_flag; + PEXStructurePath start_path; + PEXListOfNameSetPair normal; + PEXListOfNameSetPair inverted; +} PEXSCAttributes; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef struct { + unsigned short count; /* number of pairs */ + PEXNameSetPair *pairs; +} PEXListOfNameSetPair; +.sp +typedef struct { + PEXNameSet inclusion; + PEXNameSet exclusion; +} PEXNameSetPair; +.sp +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadPEXSearchContext\fP 1i +The specified search context resource identifier is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateSearchContext , +.PN PEXGetSearchContext +.RE +.bp +.SH +PEXCopySearchContext - Copy Search Context +.XS + PEXCopySearchContext +.XE +.IN "PEXCopySearchContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopySearchContext\^(\^Display *\fIdisplay\fP\^, unsigned long \fIvalue_mask\fP\^, PEXSearchContext \fIsrc_context\fP\^, PEXSearchContext \fIdst_context\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIvalue_mask\fP 1i +A mask specifying which attributes are to be copied. +.IP \fIsrc_context\fP 1i +The resource identifier of the source search context. +.IP \fIdst_context\fP 1i +The resource identifier of the destination search context. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies attributes from the source search context +to the destination search context resource. Both must +already exist as valid search context resources. +Attributes indicated by the value mask are copied and the +remainder of the attributes are left unchanged. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXSCPosition +.PN PEXSCDistance +.PN PEXSCCeiling +.PN PEXSCModelClipFlag +.PN PEXSCStartPath +.PN PEXSCNormalList +.PN PEXSCInvertedList +.DE +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXSearchContext; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXSearchContext\fP 1i +The specified search context resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateSearchContext +.RE +.bp +.SH +PEXCreateSearchContext - Create Search Context +.XS + PEXCreateSearchContext +.XE +.IN "PEXCreateSearchContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSearchContext PEXCreateSearchContext\^(\^Display *\fIdisplay\fP\^, unsigned long \fIvalue_mask\fP\^, PEXSCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIvalue_mask\fP 1i +A mask indicating the attributes specified. +.IP \fIvalues\fP 1i +A pointer to values used to override default values in the new search context resource. +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created search context resource. +.RE +.SH +Description +.RS +.LP +This function creates a search context and returns the resource +identifier of the created search context resource. +The value mask indicates which values are specified to override the default +values. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXSCPosition +.PN PEXSCDistance +.PN PEXSCCeiling +.PN PEXSCModelClipFlag +.PN PEXSCStartPath +.PN PEXSCNormalList +.PN PEXSCInvertedList +.DE +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXSearchContext; +.sp +typedef struct { + PEXCoord position; + float distance; + unsigned short ceiling; + Bool model_clip_flag; + PEXStructurePath start_path; + PEXListOfNameSetPair normal; + PEXListOfNameSetPair inverted; +} PEXSCAttributes; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef struct { + unsigned short count; /* number of pairs */ + PEXNameSetPair *pairs; +} PEXListOfNameSetPair; +.sp +typedef struct { + PEXNameSet inclusion; + PEXNameSet exclusion; +} PEXNameSetPair; +.sp +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadValue\fP 1i +A specified value is out of range, or an invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeSearchContext +.RE +.bp +.SH +PEXFreeSCAttributes - Free Storage Returned by PEXGetSearchContext +.XS + PEXFreeSCAttributes +.XE +.IN "PEXFreeSCAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeSCAttributes\^(\^PEXSCAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the search context attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetSearchContext . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetSearchContext +.RE +.bp +.SH +PEXFreeSearchContext - Free Search Context +.XS + PEXFreeSearchContext +.XE +.IN "PEXFreeSearchContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeSearchContext\^(\^Display *\fIdisplay\fP\^, PEXSearchContext \fIcontext\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the search context. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the search context resource and frees +memory associated with it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXSearchContext\fP 1i +The specified search context resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateSearchContext +.RE +.bp +.SH +PEXGetSearchContext - Get Search Context Attributes +.XS + PEXGetSearchContext +.XE +.IN "PEXGetSearchContext" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSCAttributes *PEXGetSearchContext\^(\^Display *\fIdisplay\fP\^, PEXSearchContext \fIcontext\fP\^, unsigned long \fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the search context to be queried. +.IP \fIvalue_mask\fP 1i +A mask indicating which attributes to return. +.RE +.SH +Returns +.RS +.LP +A pointer to the requested attribute values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the requested attribute values of the specified search +context resource. The +value mask indicates which attributes are to be returned. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXSCPosition +.PN PEXSCDistance +.PN PEXSCCeiling +.PN PEXSCModelClipFlag +.PN PEXSCStartPath +.PN PEXSCNormalList +.PN PEXSCInvertedList +.DE +.LP +PEXlib allocates memory for the returned search context attribute values. +.PN PEXFreeSCAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXSearchContext; +.sp +typedef struct { + PEXCoord position; + float distance; + unsigned short ceiling; + Bool model_clip_flag; + PEXStructurePath start_path; + PEXListOfNameSetPair normal; + PEXListOfNameSetPair inverted; +} PEXSCAttributes; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef struct { + unsigned short count; /* number of pairs */ + PEXNameSetPair *pairs; +} PEXListOfNameSetPair; +.sp +typedef struct { + PEXNameSet inclusion; + PEXNameSet exclusion; +} PEXNameSetPair; +.sp +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXSearchContext\fP 1i +The specified search context resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateSearchContext , +.PN PEXChangeSearchContext , +.PN PEXFreeSCAttributes +.RE +.bp +.SH +PEXSearchNetwork - Search Network +.XS + PEXSearchNetwork +.XE +.IN "PEXSearchNetwork" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXSearchNetwork\^(\^Display *\fIdisplay\fP\^, PEXSearchContext \fIcontext\fP\^, PEXStructurePath **\fIpath_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIcontext\fP 1i +The resource identifier of the search context. +.IP \fIpath_return\fP 1i +Returns a pointer to a structure network path identifying the first primitive found. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful; non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function searches a structure network according to the specified search +criteria. The path to the first primitive +found that satisfies the search criteria is returned. +If no primitive is found that satisfies the criteria, a null pointer is +returned. +.LP +After the search has been completed, the start path attribute of +the specified search context will be set to the path returned, +if a primitive was found. +.LP +PEXlib allocates memory for the returned structure path. +.PN PEXFreeStructurePaths +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXSearchContext; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXElementRef *elements; +} PEXStructurePath; +.sp +typedef struct { + PEXStructure structure; + unsigned long offset; +} PEXElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadPEXSearchContext\fP 1i +The specified search context resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateSearchContext , +.PN PEXChangeSearchContext , +.PN PEXFreeStructurePaths +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter10 b/xc/doc/specs/PEX5/PEXlib/chapter10 new file mode 100644 index 000000000..9a454c1da --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter10 @@ -0,0 +1,2152 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 10\fP\s-1 + +\s+1\fBPHIGS Workstations\fP\s-1 +.sp 2 +.nr H1 10 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 10: PHIGS Workstations +.XE +.LP +.IN "PHIGS workstation" +.IN "workstation" "PHIGS" +The PHIGS workstation resource encapsulates the PEX functionality to support +the PHIGS abstraction of a "workstation". The PHIGS definition of a workstation +states that a workstation consists of zero or one display space. In X, many +display spaces (windows) are possible in a single workstation display. The +PHIGS workstation resource ties together a single X drawable, a set of lookup +tables, highlighting and invisibility name sets, and all of the state needed to +make it perform as a PHIGS user expects a workstation should perform. +.LP +Each PHIGS workstation resource contains the following attributes +defined at the time it is created: +.ID +target drawable +color approximation table +color table +depth cue table +edge bundle +interior bundle +marker bundle +light table +line bundle +pattern table +text bundle +text font table +highlight inclusion +highlight exclusion +invisibility inclusion +invisibility exclusion +.DE +.LP +These attributes can be inquired but not modified during the lifetime of the +PHIGS workstation. These attributes function in a manner identical to +their counterparts in a renderer resource. +Note that there is no view table as in the renderer. The workstation has a +built-in view table that can only be accessed through the defined workstation +functions. However, this view table is functionally the same as that used by +the renderer. +.LP +A workstation also contains the following attributes that can be +modified or inquired with various functions: +.ID +posted structure networks +requested NPC subvolume +current NPC subvolume +requested viewport +current viewport +requested HLHSR mode +current HLHSR mode +defined views +display update mode +requested buffer mode +current buffer mode +.DE +.LP +The posted structure networks attribute maintains a list of +structure resource identifiers, together with a priority value for each. +The priority values are relative, and are specified at the time +the structure network is added to the list (posted). +Whenever a structure traversal is requested, each of the structure networks +in this list is traversed. +If multiple structures that would overlap on the screen are posted, the +structure network with the higher priority is guaranteed to be visible. +If two structures have the same priority and would overlap on the screen, +the structure posted later has the higher priority. +.LP +The +.PN PEXPostStructure +function is called to post structure networks to a +PHIGS workstation resource, and the +.PN PEXUnpostStructure +function is called +to unpost a structure network. The +.PN PEXUnpostAllStructures +function is +called to reset the posted structure network list to the null list. Finally, +given a structure resource id, the +.PN PEXGetWorkstationPostings +function returns a list +of all PHIGS workstations to which the structure has been posted. +.LP +The PHIGS workstation resource supports the concepts of +requested changes and current values. +The user can change the viewport, NPC subvolume, HLHSR mode and buffer mode +attributes, but the changes are not actually applied until the +next structure traversal occurs or the user calls +the +.PN PEXExecuteDeferredActions +function. +Thus, there are pairs of attributes +for the NPC subvolume, viewport, HLHSR mode and buffer mode: the requested +value and the current value. +.LP +The list of defined views is similar to a view table. However, +a PHIGS workstation must also be able to separate requested +views from current views. Views also have an input priority value associated +with them in PHIGS workstation resources. Because of these differences +in semantics, the PHIGS workstation resource was designed to have a +built-in view table rather than an associated view lookup table. +.LP +When doing a picking or mapping +operation, it is necessary to map device coordinates through the inverse +of the viewing/projection transform to determine the primitive +that was selected. +The reason for the view priority is that several views can produce a +projection onto the same area of the screen. Thus, specifying a device +coordinate point for the picking operation can be ambiguous. If there +is more than one view that projects onto the specified device coordinate +point, it is not clear which set of viewing parameters to use to compute +the inverse transform. Adding a priority to each of the views removes +the ambiguity. +.LP +View priorities are adjusted with the +.PN PEXSetWorkstationViewPriority +function. +The +.PN PEXMapDCToWC +function is provided as an aid for mapping +device coordinate points back into world coordinates. The function +.PN PEXMapWCToDC +aids in mapping world coordinates to device coordinates. +Views are modified with the +.PN PEXSetWorkstationViewRep +function, but +are not actually applied until the +next structure traversal occurs or the user calls +the +.PN PEXExecuteDeferredActions +function. +.LP +The display update mode indicates how the PHIGS +workstation should attempt to visualize changes that occur. The defined +types include +.PN PEXVisualizeEach , +.PN PEXVisualizeEasy , +.PN PEXVisualizeNone , +.PN PEXVisualizeWhenever , +and +.PN PEXSimulateSome . +A type of +.PN PEXVisualizeEach +means that each change is displayed as it occurs, +even doing a retraversal of the posted structure network list if +necessary. +A type of +.PN PEXVisualizeEasy +means that those changes which can be represented without doing a +retraversal, or even those that require a retraversal if traversal is very +fast, are displayed as they occur. +A type of +.PN PEXVisualizeNone +means that changes are applied to the structure, but +the structure is not traversed until the application program explicitly +requests it. +A type of +.PN PEXVisualizeWhenever +means that traversal of the structure is done +when it is convenient to do so. +A type of +.PN PEXSimulateSome +means that the easy or fast changes are immediately +displayed and others are simulated by such means as drawing a deleted +primitive in the background color. +.LP +A PHIGS workstation contains the following attributes to maintain +the state of the PHIGS workstation resource: +.ID +visual state +display surface +view update +workstation update +HLHSR update +buffer update +number of priorities +.DE +These attributes can be inquired., but are not +modifiable by users; they are modified as side effects of various requests. +.LP +The visual state attribute maintains a value that indicates +whether the image is correct, whether some parts of the image have +been changed but simulated on the display, or whether there are deferred +actions that have yet to be visualized. +.LP +The display surface +indicates whether the PHIGS workstation has rendered anything +on the associated drawable. +.LP +The view update, workstation update, +HLHSR update and buffer update attributes specify whether there are +any requested changes to the list of views, the NPC subvolume or viewport, +the HLHSR mode or the buffer mode respectively. +.LP +A PHIGS workstation's posted structure networks can be retraversed +explicitly by calling +.PN PEXRedrawAllStructures . +The +.PN PEXUpdateWorkstation +function can be called to perform a traversal if +the visual state is not correct. The +.PN PEXGetWorkstationDynamics +function +is called to obtain information about how changes to various +attributes are visualized. +.LP +Structure traversal using a PHIGS workstation resource has side effects +beyond those of a renderer. When a traversal is performed using a PHIGS +workstation, the drawable is cleared to the color stored in entry zero +of the associated color lookup table. Furthermore, all pending changes +to the PHIGS workstation attributes are made current as a traversal begins. +Finally, the displayed image state is set to correct at the end of the +traversal. +.LP +Pick device descriptors are also a part of the workstation resource. They +are defined in \fIChapter 11: PHIGS Workstation Picking\fP. +.LP +If the drawable associated with a workstation resource is destroyed, the +workstation resource is implicitly freed. The next access to the workstation +will generate a +.PN BadPEXWorkstation +error. +.LP +Lookup tables and name set resource can be bound to a workstation resource and +then freed. The contents of these resources will remain, since they are still +being referenced by the workstation. However, when a workstation's attributes +are inquired, the value +.PN PEXAlreadyFreed +will be returned for those resources that have been freed and thus no longer +have a valid resource identifier by which they can be referenced. +.bp +.XS +Function Descriptions +.XE +.SH +PEXCreateWorkstation - Create Workstation +.XS + PEXCreateWorkstation +.XE +.IN "PEXCreateWorkstation" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXWorkstation PEXCreateWorkstation\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXLookupTable \fIline_bundle\fP\^, PEXLookupTable \fImarker_bundle\fP\^, PEXLookupTable \fItext_bundle\fP\^, PEXLookupTable \fIinterior_bundle\fP\^, PEXLookupTable \fIedge_bundle\fP\^, +PEXLookupTable \fIcolor_table\fP\^, PEXLookupTable \fIpattern_table\fP\^, PEXLookupTable \fIfont_table\fP\^, PEXLookupTable \fIdepth_cue_table\fP\^, PEXLookupTable \fIlight_table\fP\^, PEXLookupTable \fIcolor_approx_table\fP\^, PEXNameSet \fIhighlight_incl\fP\^, PEXNameSet \fIhighlight_excl\fP\^, PEXNameSet \fIinvisibility_incl\fP\^, PEXNameSet \fIinvisibility_excl\fP\^, int \fIbuffer_mode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIline_bundle\fP 1i +The resource identifier of the line bundle lookup table. +.IP \fImarker_bundle\fP 1i +The resource identifier of the marker bundle lookup table. +.IP \fItext_bundle\fP 1i +The resource identifier of the text bundle lookup table. +.IP \fIinterior_bundle\fP 1i +The resource identifier of the interior bundle lookup table. +.IP \fIedge_bundle\fP 1i +The resource identifier of the edge bundle lookup table. +.IP \fIcolor_table\fP 1i +The resource identifier of the color lookup table. +.IP \fIpattern_table\fP 1i +The resource identifier of the pattern lookup table. +.IP \fIfont_table\fP 1i +The resource identifier of the text font lookup table. +.IP \fIdepth_cue_table\fP 1i +The resource identifier of the depth cue lookup table. +.IP \fIlight_table\fP 1i +The resource identifier of the light lookup table. +.IP \fIcolor_approx_table\fP 1i +The resource identifier of the color approximation lookup table. +.IP \fIhighlight_incl\fP 1i +The name set used as the highlight inclusion set. +.IP \fIhighlight_excl\fP 1i +The name set used as the highlight exclusion set. +.IP \fIinvisibility_incl\fP 1i +The name set used as the invisibility inclusion set. +.IP \fIinvisibility_excl\fP 1i +The name set used as the invisibility exclusion set. +.IP \fIbuffer_mode\fP 1i +The workstation buffering mode +.Pn ( PEXSingleBuffer +or +.PN PEXDoubleBuffer ). +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created workstation. +.RE +.SH +Description +.RS +.LP +This function creates a PHIGS workstation resource and returns its +resource identifier. The drawable specified +is associated with the newly-created workstation resource. The named +tables and name sets are also bound to the workstation resource for +use during rendering. A view table that supports current and requested +view table entries is allocated for the workstation automatically at +creation time. The requests +.PN PEXSetWorkstationViewRep +and +.PN PEXGetWorkstationViewRep +is used to modify and inquire the PHIGS workstation view table. +.LP +If the workstation is to operate in double-buffered mode and double-buffering +is supported (see +.PN PEXGetImpDepConstants ), +an additional +image buffer will be created for the drawable in an implementation-dependent +fashion. If the specified drawable is a pixmap, no double-buffering will be +performed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +typedef XID PEXLookupTable; +typedef XID PEXNameSet; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource, or the server failed to allocate +resources needed for double-buffering. +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported, or a specified lookup table resource +was not created with a compatible drawable. +.IP \fIBadPEXLookupTable\fP 1i +The specified lookup table resource identifier is invalid. +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified buffer mode is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreeWorkstation , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXExecuteDeferredActions - Execute Deferred Workstation Actions +.XS + PEXExecuteDeferredActions +.XE +.IN "PEXExecuteDeferredActions" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXExecuteDeferredActions\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function causes all deferred actions on the specified workstation to +be executed. This will cause all requested attributes to be made current +and the corresponding update attributes to be set to +.PN PEXNotPending . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXRedrawAllStructures +.RE +.bp +.SH +PEXFreeWorkstation - Free Workstation +.XS + PEXFreeWorkstation +.XE +.IN "PEXFreeWorkstation" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeWorkstation\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the PHIGS workstation resource and frees +memory associated with it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreateWorkstation +.RE +.bp +.SH +PEXFreeWorkstationAttributes - Free Storage Returned by PEXGetWorkstationAttributes +.XS + PEXFreeWorkstationAttributes +.XE +.IN "PEXFreeWorkstationAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeWorkstationAttributes\^(\^PEXWorkstationAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the workstation attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetWorkstationAttributes . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetWorkstationAttributes +.RE +.bp +.SH +PEXGetWorkstationDynamics - Get Workstation Attribute Modification Dynamics +.XS + PEXGetWorkstationDynamics +.XE +.IN "PEXGetWorkstationDynamics" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetWorkstationDynamics\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXWorkstationDynamics *\fIdynamics_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIdrawable\fP 1i +The resource identifier of a drawable. +.IP \fIdynamics_return\fP 1i +Returns the dynamics of the specified workstation. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns the dynamics of the specified PHIGS workstation resource. +Each entry in the returned list has one of the following values: +.PN PEXIMM , +.PN PEXCBS +or +.PN PEXIRG . +.PN PEXIMM +means that modification of the corresponding attribute will result in the +correct image displayed immediately without regeneration. +.PN PEXCBS +means that modification of the corresponding attribute will result in a +simulation displayed immediately if the display update mode is +.PN PEXSimulateSome. +.PN PEXIRG +means that a regeneration is required for the change to be visible. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned char view_rep; + unsigned char marker_bundle; + unsigned char text_bundle; + unsigned char line_bundle; + unsigned char interior_bundle; + unsigned char edge_bundle; + unsigned char color_table; + unsigned char pattern_table; + unsigned char wks_transform; + unsigned char highlight_filter; + unsigned char invisibility_filter; + unsigned char hlhsr_mode; + unsigned char structure_modify; + unsigned char post_structure; + unsigned char unpost_structure; + unsigned char delete_structure; + unsigned char reference_modify; + unsigned char buffer_modify; + unsigned char light_table; + unsigned char depth_cue_table; + unsigned char color_approx_table; +} PEXWorkstationDynamics; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadDrawable\fP 1i +The specified drawable resource identifier is invalid. +.IP \fIBadMatch\fP 1i +The specified drawable is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetWorkstationAttributes +.RE +.bp +.SH +PEXGetWorkstationAttributes - Get Workstation Attribute Values +.XS + PEXGetWorkstationAttributes +.XE +.IN "PEXGetWorkstationAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXWorkstationAttributes *PEXGetWorkstationAttributes\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long *\fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIvalue_mask\fP 1i +A mask indicating which workstation attribute values to return. +.RE +.SH +Returns +.RS +.LP +A pointer to the workstation attribute values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the specified workstation's attributes. +The value mask indicates which attributes are to be returned. +.PN PEXSetPWAttributeMask +or +.PN PEXSetPWAttributeMaskAll +should be used to setup the value mask. +.LP +PEXlib allocates memory for the returned workstation attribute values. +.PN PEXFreeWorkstationAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + short drawable_update; + int visual_state; + int drawable_surface; + int view_update; + PEXListOfView defined_views; + int wks_update; + PEXNPCSubVolume req_npc_subvolume; + PEXNPCSubVolume cur_npc_subvolume; + PEXViewport req_workstation_viewport; + PEXViewport cur_workstation_viewport; + int hlhsr_update; + PEXEnumTypeIndex req_hlhsr_mode; + PEXEnumTypeIndex cur_hlhsr_mode; + Drawable drawable; + PEXLookupTable marker_bundle; + PEXLookupTable text_bundle; + PEXLookupTable line_bundle; + PEXLookupTable interior_bundle; + PEXLookupTable edge_bundle; + PEXLookupTable color_table; + PEXLookupTable depth_cue_table; + PEXLookupTable light_table; + PEXLookupTable color_approx_table; + PEXLookupTable pattern_table; + PEXLookupTable text_font_table; + PEXNameSet highlight_incl; + PEXNameSet highlight_excl; + PEXNameSet invisibility_incl; + PEXNameSet invisibility_excl; + PEXListOfPostedStructure posted_structures; + unsigned long count_priorities; + int buffer_update; + int req_buffer_mode; + int cur_buffer_mode; +} PEXWorkstationAttributes; +.sp +typedef struct { + unsigned short count; /* number of views */ + PEXTableIndex *views; +} PEXListOfView; +.sp +typedef unsigned short PEXTableIndex; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord min; + PEXDeviceCoord max; + PEXSwitch use_drawable; + unsigned char reserved[3]; +} PEXViewport; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef unsigned char PEXSwitch; +.sp +typedef short PEXEnumTypeIndex; +typedef XID PEXLookupTable; +typedef XID PEXNameSet; +.sp +typedef struct { + unsigned long count; /* number of posted structures*/ + PEXPostedStructure *structures; +} PEXListOfPostedStructure; +.sp +typedef struct { + PEXStructure sid; + float priority; +} PEXPostedStructure; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetWorkstationDynamics , +.PN PEXSetPWAttributeMask , +.PN PEXSetPWAttributeMaskAll +.RE +.bp +.SH +PEXGetWorkstationPostings - Get Workstation Postings +.XS + PEXGetWorkstationPostings +.XE +.IN "PEXGetWorkstationPostings" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetWorkstationPostings\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, unsigned long *\fIcount_return\fP\^, PEXWorkstation **\fIpostings_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIcount_return\fP 1i +Returns the number of workstation identifiers. +.IP \fIpostings_return\fP 1i +Returns an array of workstation resource identifiers. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function returns a list of workstation resources to which the specified +structure has been posted. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXPostStructure , +.PN PEXUnpostStructure , +.PN PEXUnpostAllStructures +.RE +.bp +.SH +PEXGetWorkstationViewRep - Get Workstation View Representation +.XS + PEXGetWorkstationViewRep +.XE +.IN "PEXGetWorkstationViewRep" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXGetWorkstationViewRep\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIindex\fP\^, int *\fIupdate_return\fP\^, PEXViewRep *\fIreq_view_return\fP\^, PEXViewRep *\fIcur_view_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIindex\fP 1i +The view table index. +.IP \fIupdate_return\fP 1i +Returns the update status of the view table index. +.IP \fIreq_view_return\fP 1i +Returns the requested value of the view table index. +.IP \fIcur_view_return\fP 1i +Returns the current value of the view table index. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +The function returns the update state, and the requested and current +values for the specified view index of the specified workstation. +The update will be +.PN PEXPending +if a view change has been requested but not established; otherwise it will be +.PN PEXNotPending . +If the specified +view index is not defined, an error will be generated and the contents of the +reply parameters will be undefined. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; + PEXViewEntry view; +} PEXViewRep; +.sp +typedef unsigned short PEXTableIndex; +.sp +typedef struct { + unsigned short clip_flags; + unsigned short reserved; + PEXNPCSubVolume clip_limits; + PEXMatrix orientation; + PEXMatrix mapping; +} PEXViewEntry; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef float PEXMatrix[4][4]; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified view table entry is not defined. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetWorkstationViewRep +.RE +.bp +.SH +PEXMapDCToWC - Map Device Coordinate Points to World Coordinate Points +.XS + PEXMapDCToWC +.XE +.IN "PEXMapDCToWC" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXMapDCToWC\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIdc_count\fP\^, PEXDeviceCoord *\fIdc_points\fP\^, unsigned int *\fIview_index_return\fP\^, unsigned long *\fIwc_count_return\fP\^, PEXCoord **\fIwc_points_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIdc_count\fP 1i +The number of device coordinate points. +.IP \fIdc_points\fP 1i +An array of device coordinates. +.IP \fIview_index_return\fP 1i +Returns the view index of the view containing most or all of the points. +.IP \fIwc_count_return\fP 1i +Returns the number of world coordinate points. +.IP \fIwc_points_return\fP 1i +Returns an array of world coordinate points. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function maps the device coordinate points to world coordinate points +using the specified workstation. Each view in the workstation's current +view table, which has an inverse, is checked to see if it contains all the +specified device coordinate points. +(If the view transform has no inverse, it is not considered.) +The index of the view with the highest view transformation input +priority that contains all of the points is returned. If no view contains all +the points, the index of the view containing the most points is returned. The +points are transformed to world coordinates by passing them through the inverse +of the view transform associated with the view index. +Points that are clipped +(outside the viewport) will not be transformed and returned, so the number +of points returned may be less than the number sent. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXMapWCToDC , +.PN PEXSetWorkstationViewPriority +.RE +.bp +.SH +PEXMapWCToDC - Map World Coordinate Points to Device Coordinate Points +.XS + PEXMapWCToDC +.XE +.IN "PEXMapWCToDC" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXMapWCToDC\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIwc_count\fP\^, PEXCoord *\fIwc_points\fP\^, unsigned int \fIview_index\fP\^, unsigned long *\fIdc_count_return\fP\^, PEXDeviceCoord **\fIdc_points_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIwc_count\fP 1i +The number of world coordinate points. +.IP \fIwc_points\fP 1i +An array of world coordinate points. +.IP \fIview_index\fP 1i +The view index to use in transforming the world coordinate points. +.IP \fIdc_count_return\fP 1i +Returns the number of device coordinate points. +.IP \fIdc_points_return\fP 1i +Returns an array of device coordinate points. +.RE +.SH +Returns +.RS +.LP +Zero if unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function maps the world coordinate points to device coordinate points +using the specified workstation and view index. The points are transformed +to device coordinates by passing them through the view transform associated +with the view index. Points that are clipped will not be returned, so the +number of points returned may be less than the number sent. +.LP +PEXlib allocates memory for the return value. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXMapDCToWC , +.PN PEXSetWorkstationViewPriority +.RE +.bp +.SH +PEXPostStructure - Post Structure to a Workstation +.XS + PEXPostStructure +.XE +.IN "PEXPostStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXPostStructure\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXStructure \fIstructure\fP\^, double \fIpriority\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.IP \fIpriority\fP 1i +The priority of the newly-posted structure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function adds the specified structure to the list of posted structures +in the specified workstation. The priority is used to indicate the priority +of the new posted structure relative to the structures already posted. If +multiple structures are posted for display to the same display space location, +the higher priority structure will be displayed. If two structures have the +same priority, the last posted structure is considered of higher priority. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXStructure; +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXUnpostStructure , +.PN PEXUnpostAllStructures +.RE +.bp +.SH +PEXRedrawAllStructures - Redraw All Posted Structures +.XS + PEXRedrawAllStructures +.XE +.IN "PEXRedrawAllStructures" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRedrawAllStructures\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function redraws all of the posted structures for the workstation. +First, if the workstation's display surface is +.PN PEXNotEmpty , +its drawable is cleared to the color stored in entry zero of the color table. +Then, if any of its view, workstation, HLHSR or buffer update attributes is +set to +.PN PEXPending , +the requested values are made current and the update attributes are set to +.PN PEXNotPending . +After this, all the posted structures are traversed and rendered +(in priority order). Finally, the workstation's visual state is set to +.PN PEXCorrect . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXUpdateWorkstation , +.PN PEXExecuteDeferredActions +.RE +.bp +.SH +PEXRedrawClipRegion - Redraw Posted Structures Clipped to Clip Region +.XS + PEXRedrawClipRegion +.XE +.IN "PEXRedrawClipRegion" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRedrawClipRegion\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIcount\fP\^, PEXDeviceRect *\fIclip_rectangles\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIcount\fP 1i +The number of clip rectangles. +.IP \fIclip_rectangles\fP 1i +An array of device clip rectangles. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function performs actions similar to +.PN PEXRedrawAllStructures +except that the workstation state attributes are not modified or updated by +this function and rendering will occur only in the region defined by +the specified clip list. The color stored in entry zero of the color table +is used to clear the region defined by the clip list. The clip list must +consist of non-overlapping rectangles or the result will be undefined. If +a z-buffering HLHSR algorithm is used, only the z-values corresponding to +pixels in the clip region will be affected. All of the posted structures +for the workstation are redrawn, but clipped to the clip list. Pending +changes are not made current, nor is the visual state modified. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + short xmin; + short ymin; + short xmax; + short ymax; +} PEXDeviceRect; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXRedrawAllStructures , +.PN PEXExecuteDeferredActions +.RE +.bp +.SH +PEXSetWorkstationBufferMode - Set Workstation Buffer Mode +.XS + PEXSetWorkstationBufferMode +.XE +.IN "PEXSetWorkstationBufferMode" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationBufferMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIbuffer_mode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIbuffer_mode\fP 1i +The workstation buffering mode +.Pn ( PEXSingleBuffer +or +.PN PEXDoubleBuffer ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the requested buffer mode of the specified workstation. +If the workstation's display surface attribute is +.PN PEXEmpty , +or if the dynamic modification for buffer mode is +.PN PEXIMM , +the current buffer mode is set to the specified buffer mode and the buffer +update is set to +.PN PEXNotPending ; +otherwise, the buffer update is set to +.PN PEXPending +and the current buffer mode is not changed. +.LP +Buffer mode may be one of the following values: +.PN PEXSingleBuffer +or +.PN PEXDoubleBuffer . +An error will be generated if the buffer mode is +.PN PEXDoubleBuffer +and the server cannot allocated the second image buffer. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources needed for double-buffering. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified buffer mode is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetWorkstationDisplayUpdateMode , +.PN PEXGetImpDepConstants +.RE +.bp +.SH +PEXSetWorkstationDisplayUpdateMode - Set Workstation Display Update Mode +.XS + PEXSetWorkstationDisplayUpdateMode +.XE +.IN "PEXSetWorkstationDisplayUpdateMode" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationDisplayUpdateMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIupdate_mode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIupdate_mode\fP 1i +The workstation display update mode +.Pn ( PEXVisualizeEach , +.PN PEXVisualizeEasy , +.PN PEXVisualizeNone , +.PN PEXSimulateSome , +.PN PEXVisualizeWhenever ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the display update attribute of the specified workstation. +This attribute defines how changes to the display surface will be visualized. +The supported values for display update mode are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +If double-buffering is enabled, the display update mode affects which buffer +is rendered into during traversal. If the display update mode is +.PN PEXVisualizeEach , +.PN PEXVisualizeWhenever +or +.PN PEXVisualizeNone , +output primitives are rendered into the back (undisplayed) buffer while the +structure network is being traversed. +When the traversal is complete, the front and back buffers are swapped, so the +rendered image is displayed. If the display update mode is +.PN PEXVisualizeEasy +or +.PN PEXSimulateSome , +output primitives are always rendered into the front (displayed) buffer. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified display update mode is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXSetWorkstationBufferMode , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXSetWorkstationHLHSRMode - Set Workstation HLHSR Mode +.XS + PEXSetWorkstationHLHSRMode +.XE +.IN "PEXSetWorkstationHLHSRMode" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationHLHSRMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIhlhsr_mode\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIhlhsr_mode\fP 1i +The workstation HLHSR mode +.Pn ( PEXHLHSROff , +.PN PEXHLHSRZBuffer , +.PN PEXHLHSRPainters , +.PN PEXHLHSRScanline , +.PN PEXHLHSRHiddenLineOnly , +.PN PEXHLHSRZBufferID ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the requested HLHSR mode of the specified workstation. +If the workstation's display surface attribute is +.PN PEXEmpty , +or if the dynamic modification for HLHSR mode is +.PN PEXIMM , +the current HLHSR mode is set to the specified HLHSR mode and the HLHSR update +is set to +.PN PEXNotPending ; +otherwise, the HLHSR update is set to +.PN PEXPending +and the current HLHSR mode is not changed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate resources needed for HLHSR. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified HLHSR mode is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetWorkstationViewport - Set Workstation Viewport +.XS + PEXSetWorkstationViewport +.XE +.IN "PEXSetWorkstationViewport" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationViewport\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXViewport *\fIviewport\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIviewport\fP 1i +The workstation viewport. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the requested workstation viewport of the specified +workstation. +If the dynamic modification for workstation viewport is +.PN PEXIMM , +the current workstation viewport is set to the specified viewport and the +workstation update is set to +.PN PEXNotPending ; +otherwise, the workstation update is set to +.PN PEXPending +and the current workstation viewport is not changed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + PEXDeviceCoord min; + PEXDeviceCoord max; + PEXSwitch use_drawable; + unsigned char reserved[3]; +} PEXViewport; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef unsigned char PEXSwitch; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for use_drawable is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetWorkstationViewPriority - Set Workstation View Priority +.XS + PEXSetWorkstationViewPriority +.XE +.IN "PEXSetWorkstationViewPriority" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationViewPriority\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIindex1\fP\^, unsigned int \fIindex2\fP\^, int \fIpriority\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIindex1\fP 1i +The first view table entry index. +.IP \fIindex2\fP 1i +The second view table entry index. +.IP \fIpriority\fP 1i +A relative priority of index 1 with respect to index 2 +.Pn ( PEXHigher +or +.PN PEXLower ). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the relative priorities of entries in the workstation's +current view table. The priority of the first view table entry with respect +to the second view table entry is set to the next higher or lower priority +as indicated by the specified priority. These priorities are used to determine +the order in which view table entries are tested when selecting the +inverse viewing transformation to use for transforming from device coordinates +to world coordinates. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified value for priority is invalid, or the specified table entry is +not defined. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetWorkstationViewRep - Set Workstation View Representation +.XS + PEXSetWorkstationViewRep +.XE +.IN "PEXSetWorkstationViewRep" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationViewRep\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIview_index\fP\^, PEXViewEntry *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIview_index\fP 1i +The view index. +.IP \fIvalues\fP 1i +A pointer to the view representation values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sets the specified view table entry of the requested view table +in the specified workstation. +If the dynamic modification for the view table is +.PN PEXIMM , +the current view table entry is set to the specified view representation and +the view update is set to +.PN PEXNotPending ; +otherwise, the view update is set to +.PN PEXPending +and the current view table is not changed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + unsigned short clip_flags; + unsigned short reserved; + PEXNPCSubVolume clip_limits; + PEXMatrix orientation; + PEXMatrix mapping; +} PEXViewEntry; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef float PEXMatrix[4][4]; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The view table is full. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXSetWorkstationWindow - Set Workstation Window +.XS + PEXSetWorkstationWindow +.XE +.IN "PEXSetWorkstationWindow" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetWorkstationWindow\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXNPCSubVolume *\fIworkstation_window\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIworkstation_window\fP 1i +The workstation window. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function set the requested NPC subvolume of the specified workstation. +If the dynamic modification for the workstation window is +.PN PEXIMM , +the current workstation window is set to the specified NPC subvolume and +the workstation update is set to +.PN PEXNotPending ; +otherwise, the workstation update is set to +.PN PEXPending +and the current workstation window is not changed. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXUnpostAllStructures - Unpost All Structures from Workstation +.XS + PEXUnpostAllStructures +.XE +.IN "PEXUnpostAllStructures" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXUnpostAllStructures\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function removes all structures from the specified workstation's posted +structure list. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXUnpostStructure +.RE +.bp +.SH +PEXUnpostStructure - Unpost Structure from Workstation +.XS + PEXUnpostStructure +.XE +.IN "PEXUnpostStructure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXUnpostStructure\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXStructure \fIstructure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIstructure\fP 1i +The resource identifier of the structure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function removes the specified structure from the workstation's posted +structure list. If the structure is not found in the list, +an error is generated. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXUnpostAllStructures +.RE +.bp +.SH +PEXUpdateWorkstation - Update Workstation +.XS + PEXUpdateWorkstation +.XE +.IN "PEXUpdateWorkstation" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXUpdateWorkstation\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function will perform actions identical to +.PN PEXRedrawAllStructures +on the specified workstation if the workstation's visual state is currently +set to +.PN PEXDeferred +or +.PN PEXSimulated . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXRedrawAllStructures +.RE +.bp +.SH +PEXSetPWAttributeMask - Macro to Setup Workstation Attributes Value Mask +.XS + PEXSetPWAttributeMask +.XE +.IN "PEXSetPWAttributeMask" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSetPWAttributeMask(\^\fImask\fP\^, \fIattr\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImask\fP 1i +The address of the value mask - an array of two unsigned long. +.IP \fIattr\fP 1i +A single workstation attribute bitmask constant. +.RE +.SH +Description +.RS +.LP +This is a utility macro +to aid in setting up the bitmask for the workstation +attributes. +.LP +The following constants must be used: +.ID +.PN PEXPWDisplayUpdate +.PN PEXPWVisualState +.PN PEXPWDisplaySurface +.PN PEXPWViewUpdate +.PN PEXPWDefinedViews +.PN PEXPWWorkstationUpdate +.PN PEXPWReqNPCSubVolume +.PN PEXPWCurNPCSubVolume +.PN PEXPWReqViewport +.PN PEXPWCurViewport +.PN PEXPWHLHSRUpdate +.PN PEXPWReqHLHSRMode +.PN PEXPWCurHLHSRMode +.PN PEXPWDrawable +.PN PEXPWMarkerBundle +.PN PEXPWTextBundle +.PN PEXPWLineBundle +.PN PEXPWInteriorBundle +.PN PEXPWEdgeBundle +.PN PEXPWColorTable +.PN PEXPWDepthCueTable +.PN PEXPWLightTable +.PN PEXPWColorApproxTable +.PN PEXPWPatternTable +.PN PEXPWTextFontTable +.PN PEXPWHighlightIncl +.PN PEXPWHighlightExcl +.PN PEXPWInvisibilityIncl +.PN PEXPWInvisibilityExcl +.PN PEXPWPostedStructures +.PN PEXPWNumPriorities +.PN PEXPWBufferUpdate +.PN PEXPWReqBufferMode +.PN PEXPWCurBufferMode +.DE +Note that this macro does multiple evaluations of the value for attr. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetWorkstationAttributes +.RE +.bp +.SH +PEXSetPWAttributeMaskAll - Macro to Set All Workstation Attributes in Value Mask +.XS + PEXSetPWAttributeMaskAll +.XE +.IN "PEXSetPWAttributeMaskAll" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXSetPWAttributeMaskAll(\^\fImask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImask\fP 1i +The address of the value mask - an array of two unsigned long. +.RE +.SH +Description +.RS +.LP +This is a utility macro +to aid in setting up the bitmask for the workstation +attributes. This macro will set all valid bits in the mask. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetWorkstationAttributes +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter11 b/xc/doc/specs/PEX5/PEXlib/chapter11 new file mode 100644 index 000000000..2d4bf7ccc --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter11 @@ -0,0 +1,869 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 11\fP\s-1 + +\s+1\fBPHIGS Workstation Picking\fP\s-1 +.sp 2 +.nr H1 11 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 11: PHIGS Workstation Picking +.XE +.LP +.IN "PHIGS workstation" +.IN "workstation" "PHIGS" +.IN "workstation" "picking" +The PHIGS workstation resource encapsulates the PEX functionality to support +the PHIGS concept of a workstation. The following functionality encapsulates +the picking support for the PHIGS workstation. There are two parts to the +PHIGS workstation picking. A pick device is actually a part of the PHIGS +workstation resource, but the support for inquiring and setting the pick +device attributes is documented here. A pick measure is a separate resource +that works with the PHIGS workstation resource to perform the actual pick +operation. +.NH 2 +Workstation Pick Devices +.XS +\*(SN Workstation Pick Devices +.XE +.IN "workstation" "pick device" +.LP +Each PHIGS workstation resource maintains a list of pick device descriptors. +Each entry in the list maintains state values for a particular type of pick +device, such as a mouse or a tablet. Together, the entries in the pick device +descriptor list maintain state values for all the pick devices that are +supported by the workstation resource. This list of values can be set or +inquired for each of the supported pick devices. +.LP +Two of the pick device descriptor attributes are name set resources. If a +name set is created, bound to a pick device descriptor, and the freed, the +contents of the name set will remain, since it is still being referenced by +the pick device descriptor. However, when a pick device descriptor is +inquired, the value +.PN PEXAlreadyFreed +will be returned for the name set identifier, since it no longer has a valid +resource identifier by which it can be referenced. +.LP +The pick device descriptor attributes, in order, are: +.ID +pick status +pick path +pick path order +pick inclusion +pick exclusion +pick data record +prompt and echo type +echo volume +echo switch +.DE +.LP +The pick status attribute contains the initial pick status that will be bound +to a pick measure resource. +.LP +The pick path attribute contains the initial pick path that will be bound to a +pick measure resource. +.LP +The pick path order attribute specifies the order in which elements of the +picked path are to be written into the pick measure resource. If the order is +.PN PEXTopFirst , +elements of the pick measure's picked path attribute will be listed in the +order they would have been encountered during a traversal. If the order is +.PN PEXBottomFirst , +elements of the pick measure's picked path attribute will be listed in the +order opposite from the order they would have been encountered during a +traversal. +.LP +The pick inclusion attribute specifies the resource identifier of the name set +that is to be used as the pick inclusion filter during pick operations. +.LP +The pick exclusion attribute specifies the resource identifier of the name set +that is to be used as the pick exclusion filter during pick operations. +.LP +The pick data record attribute contains a pick-device-dependent data record used +to initialize a pick measure resource when it is created. +.LP +The prompt and echo type attribute contains a value that specifies the +prompt and echo type to be used during pick operations. The supported types +are inquirable via +.PN PEXGetEnumTypeInfo . +.LP +The echo volume attribute specifies where prompting and echoing is to occur. +The default is that the echo volume will be defined to be the size of the +drawable bound to the workstation resource at the time it was created. +.LP +The echo switch attribute specifies the initial echo state for a pick measure. +.bp +.XS +Function Descriptions +.XE +.SH +PEXFreePDAttributes - Free Storage Returned by PEXGetPickDevice +.XS + PEXFreePDAttributes +.XE +.IN "PEXFreePDAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePDAttributes\^(\^PEXPDAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the pick device attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetPickDevice . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetPickDevice +.RE +.bp +.SH +PEXGetPickDevice - Get Pick Device Attributes +.XS + PEXGetPickDevice +.XE +.IN "PEXGetPickDevice" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPDAttributes *PEXGetPickDevice\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIpick_device_type\fP\^, unsigned long \fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIvalue_mask\fP 1i +A mask indicating which attributes to return. +.RE +.SH +Returns +.RS +.LP +A pointer to the pick device attribute values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the attribute values of a pick descriptor for the PHIGS +workstation resource specified. The descriptor returned will be the +currently-defined descriptor for the pick device of the type specified. +Supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +The value mask indicates which attributes are to be returned. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXPDPickStatus +.PN PEXPDPickPath +.PN PEXPDPickPathOrder +.PN PEXPDPickIncl +.PN PEXPDPickExcl +.PN PEXPDPickDataRec +.PN PEXPDPromptEchoType +.PN PEXPDEchoVolume +.PN PEXPDEchoSwitch +.DE +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePDAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + unsigned short status; + PEXPickPath path; + int path_order; + PEXNameSet inclusion; + PEXNameSet exclusion; + PEXPickRecord pick_record; + PEXEnumTypeIndex prompt_echo_type; + PEXViewport echo_volume; + int echo_switch; +} PEXPDAttributes; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef XID PEXNameSet; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.sp +typedef short PEXEnumTypeIndex; +.sp +typedef struct { + PEXDeviceCoord min; + PEXDeviceCoord max; + PEXSwitch use_drawable; + unsigned char reserved[3]; +} PEXViewport; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef unsigned char PEXSwitch; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified pick device type is invalid, or an invalid bit set in the value +mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXChangePickDevice , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXChangePickDevice - Change Pick Device Attributes +.XS + PEXChangePickDevice +.XE +.IN "PEXChangePickDevice" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXChangePickDevice\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIpick_device_type\fP\^, unsigned long \fIvalue_mask\fP\^, PEXPDAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIvalue_mask\fP 1i +A mask indicating which attributes to return. +.IP \fIvalues\fP 1i +A pointer to the pick device attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function will modify the attributes of a pick descriptor for the PHIGS +workstation resource specified. The descriptor to be modified will be the +currently-defined descriptor for the pick device of the type specified. +Supported pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +The value mask indicates which attributes are to be changed. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXPDPickStatus +.PN PEXPDPickPath +.PN PEXPDPickPathOrder +.PN PEXPDPickIncl +.PN PEXPDPickExcl +.PN PEXPDPickDataRec +.PN PEXPDPromptEchoType +.PN PEXPDEchoVolume +.PN PEXPDEchoSwitch +.DE +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +.sp +typedef struct { + unsigned short status; + PEXPickPath path; + int path_order; + PEXNameSet inclusion; + PEXNameSet exclusion; + PEXPickRecord pick_record; + PEXEnumTypeIndex prompt_echo_type; + PEXViewport echo_volume; + int echo_switch; +} PEXPDAttributes; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.sp +typedef XID PEXNameSet; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.sp +typedef short PEXEnumTypeIndex; +.sp +typedef struct { + PEXDeviceCoord min; + PEXDeviceCoord max; + PEXSwitch use_drawable; + unsigned char reserved[3]; +} PEXViewport; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef unsigned char PEXSwitch; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXNameSet\fP 1i +The specified name set resource identifier is invalid. +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified pick device type is invalid, a specified value is invalid, or +an invalid bit set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXGetPickDevice , +.PN PEXGetEnumTypeInfo +.RE +.bp +.NH 2 +Workstation Pick Measures +.XS +\*(SN Workstation Pick Measures +.XE +.IN "workstation" "pick measure" +.LP +A pick measure resource must be created to actually perform a pick operation +using a PHIGS workstation. A pick device type is specified at the time a +pick measure resource is created in order to provide the parameters for the +pick operation. The pick measure accepts input in the form of input records +which are defined for each type of pick device. When the pick measure is +passed a valid input record, its attributes will be updated. Operation on +a pick measure are potentially lengthy since a great number of structure +elements may have to be processed in order to produce the pick results. +.LP +The pick measure resource attributes are: +.ID +status +pick path +.DE +.LP +The pick status attribute contains the result of the last update operation +that was performed. It is set to +.PN PEXPick +if a primitive was successfully picked, and +.PN PEXNoPick +if the pick operation was unsuccessful. +.LP +The pick path attribute contains the path of the structure element that +was picked as a result of the last update operation. +.bp +.SH +PEXCreatePickMeasure - Create Pick Measure +.XS + PEXCreatePickMeasure +.XE +.IN "PEXCreatePickMeasure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPickMeasure PEXCreatePickMeasure\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIpick_device_type\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIworkstation\fP 1i +The resource identifier of the workstation. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.RE +.SH +Returns +.RS +.LP +The resource identifier of the newly-created pick measure. +.RE +.SH +Description +.RS +.LP +This function creates a pick measure resource of the type specified. The +pick measure is initialized with the values contained in the appropriate +pick device descriptor stored in the specified workstation. The supported +pick device types are inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXWorkstation; +typedef XID PEXPickMeasure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadPEXWorkstation\fP 1i +The specified workstation resource identifier is invalid. +.IP \fIBadValue\fP 1i +The specified pick device type is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreePickMeasure , +.PN PEXGetEnumTypeInfo +.RE +.bp +.SH +PEXFreePickMeasure - Free Pick Measure +.XS + PEXFreePickMeasure +.XE +.IN "PEXFreePickMeasure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePickMeasure\^(\^Display *\fIdisplay\fP\^, PEXPickMeasure \fIpick_measure\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIpick_measure\fP 1i +The resource identifier of the pick measure. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the pick measure resource and frees memory +associated with it. +.RE +.SH +Errors +.RS +.IP \fIBadPEXPickMeasure\fP 1i +The specified pick measure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePickMeasure +.RE +.bp +.SH +PEXFreePMAttributes - Free Storage Returned by PEXGetPickMeasure +.XS + PEXFreePMAttributes +.XE +.IN "PEXFreePMAttributes" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreePMAttributes\^(\^PEXPMAttributes *\fIvalues\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvalues\fP 1i +A pointer to the pick measure attribute values. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory returned by +.PN PEXGetPickMeasure . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetPickMeasure +.RE +.bp +.SH +PEXGetPickMeasure - Get Pick Measure Attributes +.XS + PEXGetPickMeasure +.XE +.IN "PEXGetPickMeasure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXPMAttributes *PEXGetPickMeasure\^(\^Display *\fIdisplay\fP\^, PEXPickMeasure \fIpick_measure\fP\^, unsigned long \fIvalue_mask\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIpick_measure\fP 1i +The resource identifier of the pick measure. +.IP \fIvalue_mask\fP 1i +A mask indicating which attributes to return. +.RE +.SH +Returns +.RS +.LP +A pointer to the pick measure attribute values; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns the specified pick measure attribute values. +The value mask indicates which attributes are to be returned. +The value mask is constructed by or'ing together the following constants: +.ID +.PN PEXPMStatus +.PN PEXPMPath +.DE +.LP +PEXlib allocates memory for the return value. +.PN PEXFreePMAttributes +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPickMeasure; +.sp +typedef struct { + unsigned short status; + PEXPickPath pick_path; +} PEXPMAttributes; +.sp +typedef struct { + unsigned long count; /* number of elements */ + PEXPickElementRef *elements; +} PEXPickPath; +.sp +typedef struct { + PEXStructure sid; + unsigned long offset; + unsigned long pick_id; +} PEXPickElementRef; +.sp +typedef XID PEXStructure; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPickMeasure\fP 1i +The specified pick measure resource identifier is invalid. +.IP \fIBadValue\fP 1i +An invalid bit is set in the value mask. +.RE +.SH +See Also +.RS +.LP +.PN PEXCreatePickMeasure +.RE +.bp +.SH +PEXUpdatePickMeasure - Update Pick Measure +.XS + PEXUpdatePickMeasure +.XE +.IN "PEXUpdatePickMeasure" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXUpdatePickMeasure\^(\^Display *\fIdisplay\fP\^, PEXPickMeasure \fIpick_measure\fP\^, int \fIpick_device_type\fP\^, PEXPickRecord *\fIpick_record\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIpick_measure\fP 1i +The resource identifier of the pick measure. +.IP \fIpick_device_type\fP 1i +The pick device type +.Pn ( PEXPickDeviceDCHitBox +or +.PN PEXPickDeviceNPCHitVolume ). +.IP \fIpick_record\fP 1i +A pointer to the pick data record. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function updates the specified pick measure resource. +If the update causes a primitive to be picked, the pick measure's pick status +will be set to +.PN PEXPick +and the pick path attribute will be set to the path of the picked +primitive. If no primitive was picked, the pick status will be set to +.PN PEXNoPick . +.LP +The pick path can be used for echoing when the pick measure is created. +However, it is not used as a start path from which to start picking. +.LP +The input record is a pointer to data used to update the pick measure and +depends on the pick device type specified when the pick measure was +created. +If the pick device type is +.PN PEXPickDeviceDCHitBox , +the input record should point to a data structure of type +.PN PEXPDDCHitBox . +If the pick device type is +.PN PEXPickDeviceNPCHitVolume , +the input record should point to a data structure of type +.PN PEXPDNPCHitVolume . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXPickMeasure; +.sp +typedef union { + PEXPDNPCHitVolume volume; + PEXPDDCHitBox box; + PEXPickDataRecord data; +} PEXPickRecord; +.sp +typedef PEXNPCSubVolume PEXPDNPCHitVolume; +.sp +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + PEXDeviceCoord2D position; + float distance; +} PEXPDDCHitBox; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short length; /* number of bytes in record */ + char *record; +} PEXPickDataRecord; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXPath\fP 1i +The specified path is invalid. +.IP \fIBadPEXPickMeasure\fP 1i +The specified pick measure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFreePickMeasure +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter12 b/xc/doc/specs/PEX5/PEXlib/chapter12 new file mode 100644 index 000000000..1d19f37ed --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter12 @@ -0,0 +1,777 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 12\fP\s-1 + +\s+1\fBPEX Fonts\fP\s-1 +.sp 2 +.nr H1 12 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 12: PEX Fonts +.XE +.LP +The PEX font manipulation mechanisms are the same mechanism as those for +X11 fonts. The PEX font resource is very similar to the font resource +created and managed by X11. PEX fonts that are used with PEX stroke precision +text contain more functionality than is currently found in X11 fonts. +Specifically, stroke precision text requires scalable and rotatable text +fonts. +Because of the added capabilities of PEX fonts, PEX has defined its own +PEX fonts open, close and query requests. However, the PEXlib functions +correlate to the Xlib font functions. +.LP +PEX uses the X11 font path in order to locate PEX font files. +.LP +The first, last and default glyph fields are indices to the first, last +and default glyphs of the font. The default glyph specifies the glyph that +will be displayed when an undefined or non-existent glyph is used. +If the default glyph specifies a non-existent glyph, nothing will be +rendered for undefined or non-existent glyphs. If all glyphs exist is +.PN True , +then all glyphs within the range of the first and last glyph have non-zero +extents. The stroke font flag indicates whether the font is a PEX font +and is provided so that the application can build font groups that all have +the same text precision. +.LP +A font is not guaranteed to have any properties defined. Whether a property +value is a signed or unsigned, and in what units it is specified must be +derived from prior knowledge of the property. Many fonts will have at least a +CHARSET_REGISTRY (e.g. "ISO8859") and a CHARSET_ENCODING (e.g. "1") property. +.LP +See also information provided in the X Logical Font Description (XLFD) +Conventions defined by the X Consortium. +.bp +.XS +Function Descriptions +.XE +.SH +PEXUnloadFont - Unload PEX Font +.XS + PEXUnloadFont +.XE +.IN "PEXUnloadFont" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXUnloadFont\^(\^Display *\fIdisplay\fP\^, PEXFont \fIfont\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIfont\fP 1i +The resource identifier of the PEX font. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deletes the association between the resource identifier and the +PEX font. The PEX font itself will be freed when no other resource +references it. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXFont; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXFont\fP 1i +The specified font resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXLoadFont +.RE +.bp +.SH +PEXFreeFontInfo - Free Font Info Returned by PEXListFontsWithInfo and PEXQueryFont +.XS + PEXFreeFontInfo +.XE +.IN "PEXFreeFontInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeFontInfo\^(\^unsigned long \fIcount\fP\^, PEXFontInfo *\fIfont_info\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of font info structures. +.IP \fIfont_info\fP 1i +An array of font info structures. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.LP +This function deallocates memory returned by +.PN PEXListFontsWithInfo +and +.PN PEXQueryFont . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXListFontsWithInfo , +.PN PEXQueryFont +.RE +.bp +.SH +PEXFreeFontNames - Free Font Names Returned by PEXListFonts, PEXListFontsWithInfo +.XS + PEXFreeFontNames +.XE +.IN "PEXFreeFontNames" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeFontNames\^(\^unsigned long \fIcount\fP, char **\fIfont_names\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of font names. +.IP \fIfont_names\fP 1i +An array of font names (null-terminated strings). +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.LP +This function deallocates memory returned by +.PN PEXListFonts +and +.PN PEXListFontsWithInfo . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXListFonts , +.PN PEXListFontsWithInfo +.RE +.bp +.SH +PEXListFonts - List PEX Fonts +.XS + PEXListFonts +.XE +.IN "PEXListFonts" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +char **PEXListFonts\^(\^Display *\fIdisplay\fP\^, char *\fIpattern\fP\^, unsigned int \fImax_names\fP\^, unsigned long *\fIcount_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIpattern\fP 1i +A null-terminated string pattern. +.IP \fImax_names\fP 1i +The maximum number of names to be returned. +.IP \fIcount_return\fP 1i +Returns the actual number of font names. +.RE +.SH +Returns +.RS +.LP +An array of font names (null-terminated strings); a null pointer if unsuccessful or if no PEX fonts supported. +.RE +.SH +Description +.RS +.LP +.LP +This function is like X11 +.PN XListFonts +except only information +about fonts that can support the full range of PEX text attributes is returned +(i.e. only those fonts that are "PEX usable"). +This list may or may not contain some of the same fonts returned by the X11 +.PN XListFonts +function. This +function returns a list of entries, each of which +contains the name of a font matching the pattern. The pattern is a +string that uses the ISO Latin-1 encoding and case is not significant in +matching names. +The '?' character (octal value 077) matches any single +character, and the character '*' (octal value 052) +matches any number of characters. +The returned names are null-terminated, in lower-case and are also ISO +Latin-1 encoded strings. +.LP +PEXlib allocates memory for the returned list of font names. +.PN PEXFreeFontNames +should be called to deallocate the memory. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXListFontsWithInfo , +.PN PEXFreeFontNames +.RE +.bp +.SH +PEXListFontsWithInfo - List PEX Fonts With Information +.XS + PEXListFontsWithInfo +.XE +.IN "PEXListFontsWithInfo" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +char **PEXListFontsWithInfo\^(\^Display *\fIdisplay\fP\^, char *\fIpattern\fP\^, unsigned int \fImax_names\fP\^, unsigned long *\fIcount_return\fP\^, PEXFontInfo **\fIinfo_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIpattern\fP 1i +A null-terminated string pattern. +.IP \fImax_names\fP 1i +The maximum number of names to be returned. +.IP \fIcount_return\fP 1i +Returns the actual number of font names. +.IP \fIfont_info\fP 1i +Returns an array of font info structures (one for each name). +.RE +.SH +Returns +.RS +.LP +An array of font names (null-terminated strings); a null pointer if unsuccessful or if no PEX fonts supported. +.RE +.SH +Description +.RS +.LP +This function is like X11 +.PN XListFontsWithInfo +except that only information +about fonts that can support the full range of PEX text attributes is returned +(i.e. those fonts that are "PEX usable"). This list may or may not contain +some of the same fonts returned the X11 +.PN XListFontsWithInfo +function. +This function returns a list of entries, each of +which contains information about a font matching the pattern. +The pattern is a string that uses the ISO Latin-1 encoding and +case is not significant in matching names. +The '?' character (octal value 077) matches any single +character, and the character '*' (octal value 052) +matches any number of characters. +The returned names are null-terminated, in lower case and are +also ISO Latin-1 encoded strings. +.LP +The information returned for each font is identical to what +.PN PEXQueryFont +would return. +.LP +PEXlib allocates memory for the returned list of font names and font info. +.PN PEXFreeFontNames +should be called to deallocate the memory for the font names. +.PN PEXFreeFontInfo +should be called to deallocate the memory for the font information. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned long first_glyph; + unsigned long last_glyph; + unsigned long default_glyph; + Bool all_exist; + Bool stroke; + unsigned short count; /* number of properties */ + PEXFontProp *props; +} PEXFontInfo; +.sp +typedef struct { + Atom name; + unsigned long value; +} PEXFontProp; +.ft P +.DE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXListFonts , +.PN PEXQueryFont +.br +.PN PEXFreeFontNames , +.PN PEXFreeFontInfo +.RE +.bp +.SH +PEXLoadFont - Load PEX Font +.XS + PEXLoadFont +.XE +.IN "PEXLoadFont" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXFont PEXLoadFont\^(\^Display *\fIdisplay\fP\^, char *\fIfont_name\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIfont_name\fP 1i +The font name (null-terminated string). +.RE +.SH +Returns +.RS +.LP +The resource identifier of the loaded PEX font. +.RE +.SH +Description +.RS +.LP +This function loads the specified PEX font, if necessary. The font +name should use the ISO Latin-1 encoding and case is not significant +in matching names. PEX fonts are not associated with a particular screen, +and can be used with any renderer or PHIGS workstation resource. +An error will be generated if the specified font is not "PEX usable", +that is, it is not capable of supporting the full range of PEX text +attributes. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXFont; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadAlloc\fP 1i +The server failed to allocate the resource. +.IP \fIBadPEXFont\fP 1i +The specified font name does not name a usable PEX font. +.RE +.SH +See Also +.RS +.LP +.PN PEXUnloadFont +.RE +.bp +.SH +PEXQueryEncodedTextExtents - Query Encoded Text Extents +.XS + PEXQueryEncodedTextExtents +.XE +.IN "PEXQueryEncodedTextExtents" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXTextExtent *PEXQueryEncodedTextExtents\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, unsigned int \fIfont_table_index\fP\^, int \fIpath\fP\^, double \fIexpansion\fP\^, double \fIspacing\fP\^, double \fIheight\fP\^, int \fIhalign\fP\^, int \fIvalign\fP\^, unsigned long \fIcount\fP\^, PEXListOfEncodedText *\fIencoded_text\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of either a renderer, a workstation or a text font table. +.IP \fIfont_table_index\fP 1i +The text font table index. +.IP \fIpath\fP 1i +The text path +.Pn ( PEXPathRight , +.PN PEXPathLeft , +.PN PEXPathUp , +.PN PEXPathDown ). +.IP \fIexpansion\fP 1i +The text character expansion factor. +.IP \fIspacing\fP 1i +The text character spacing factor. +.IP \fIheight\fP 1i +The text character height. +.IP \fIhalign\fP 1i +The text horizontal text alignment +.Pn ( PEXHAlignNormal , +.PN PEXHAlignLeft , +.PN PEXHAlignCenter , +.PN PEXHAlignRight ). +.IP \fIvalign\fP 1i +The text vertical text alignment +.Pn ( PEXVAlignNormal , +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase , +.PN PEXVAlignBottom ). +.IP \fIcount\fP 1i +The number of encoded text strings. +.IP \fIencoded_text\fP 1i +An array of encoded text strings. +.RE +.SH +Returns +.RS +.LP +An array of text extents; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function is like +.PN PEXQueryTextExtents , +except +that multiple encoded text strings are specified. Each text +string in the encoded text list has a character set, a character +set width, an encoding state, and a list of characters. (See +.PN PEXEncodedTextData .) +.LP +The character +set is an index into the current font group. Font groups have +individual fonts which are numbered starting at one; a value of +three would select the third font in the font group currently being +used. If a character set is not available in the current font +group then the default +font group is used. If a character set value is not available in the +default font group then the result is +implementation-dependent. The character set width indicates +the width or size of characters in the strings. +Valid values for character set width are +.PN PEXCSByte , +.PN PEXCSShort +and +.PN PEXCSLong . +The encoding state is provided for use by the application and is not +interpreted by the PEX server. +.LP +All other aspects of this function are the same as +.PN PEXQueryTextExtents . +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short count; /* number of encodings */ + PEXEncodedTextData *encoded_text; +} PEXListOfEncodedText; +.sp +typedef struct { + unsigned short character_set; + unsigned char character_set_width; + unsigned char encoding_state; + unsigned short reserved; + unsigned short length; + char *ch; +} PEXEncodedTextData; +.sp +typedef struct { + PEXCoord2D lower_left; + PEXCoord2D upper_right; + PEXCoord2D concat_point; +} PEXTextExtent; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadMatch\fP 1i +The specified resource identifier identifies a table of type other than a +text font table. +.IP \fIBadValue\fP 1i +A specified value for one or text attributes is invalid, or the specified +resource identifier does not identify a valid renderer, workstation or +lookup table resource. +.RE +.SH +See Also +.RS +.LP +.PN PEXQueryTextExtents +.RE +.bp +.SH +PEXQueryFont - Query PEX Font Information +.XS + PEXQueryFont +.XE +.IN "PEXQueryFont" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXFontInfo *PEXQueryFont\^(\^Display *\fIdisplay\fP\^, PEXFont \fIfont\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIfont\fP 1i +The resource identifier of the font. +.RE +.SH +Returns +.RS +.LP +A pointer to the font info structure; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns information about the specified PEX font. +The information returned is identical to what +.PN PEXListFontsWithInfo +would return. +.LP +PEXlib allocates memory for the returned list of font information. +.PN PEXFreeFontInfo +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXFont; +.sp +typedef struct { + unsigned long first_glyph; + unsigned long last_glyph; + unsigned long default_glyph; + Bool all_exist; + Bool stroke; + unsigned short count; /* number of properties */ + PEXFontProp *props; +} PEXFontInfo; +.sp +typedef struct { + Atom name; + unsigned long value; +} PEXFontProp; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXFont\fP 1i +The specified font resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.RE +.bp +.SH +PEXQueryTextExtents - Query Text Extents +.XS + PEXQueryTextExtents +.XE +.IN "PEXQueryTextExtents" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXTextExtent *PEXQueryTextExtents\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, unsigned int \fIfont_table_index\fP\^, int \fIpath\fP\^, double \fIexpansion\fP\^, double \fIspacing\fP\^, double \fIheight\fP\^, int \fIhalign\fP\^, int \fIvalign\fP\^, unsigned long \fIcount\fP\^, PEXStringData *\fItext\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of either a renderer, a workstation or a text font table. +.IP \fIfont_table_index\fP 1i +The text font table index. +.IP \fIpath\fP 1i +The text path +.Pn ( PEXPathRight , +.PN PEXPathLeft , +.PN PEXPathUp , +.PN PEXPathDown ). +.IP \fIexpansion\fP 1i +The text character expansion factor. +.IP \fIspacing\fP 1i +The text character spacing factor. +.IP \fIheight\fP 1i +The text character height. +.IP \fIhalign\fP 1i +The text horizontal text alignment +.Pn ( PEXHAlignNormal , +.PN PEXHAlignLeft , +.PN PEXHAlignCenter , +.PN PEXHAlignRight ). +.IP \fIvalign\fP 1i +The text vertical text alignment +.Pn ( PEXVAlignNormal , +.PN PEXVAlignTop , +.PN PEXVAlignCap , +.PN PEXVAlignHalf , +.PN PEXVAlignBase , +.PN PEXVAlignBottom ). +.IP \fIcount\fP 1i +The number of text strings. +.IP \fItext\fP 1i +An array of text strings. +.RE +.SH +Returns +.RS +.LP +An array of text extents; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +.LP +This function returns the text extents, in the local 2D text coordinate system, +of each specified text string. +If the resource identifier is a renderer or PHIGS workstation, then the +text font table associated with the renderer or workstation is used. +If the resource identifier is a text font lookup table, +it is used directly. The specified font group +provides the index of the entry that is to be used to obtain the +font group. The first character set in the font will be used. +.LP +Stroke precision is assumed. The text position is (0,0) in +the local 2D text coordinate system. +The extent of each string is computed independent of the other strings. +.LP +If a specified font has no defined default glyph, then undefined glyphs +are taken to have all zero metrics. +.LP +The extent data is returned in memory allocated by PEXlib. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short length; + char *ch; +} PEXStringData; +.sp +typedef struct { + PEXCoord2D lower_left; + PEXCoord2D upper_right; + PEXCoord2D concat_point; +} PEXTextExtent; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadMatch\fP 1i +The specified resource identifier identifies a table of type other than a +text font table. +.IP \fIBadValue\fP 1i +A specified value for one or text attributes is invalid, or the specified +resource identifier does not identify a valid renderer, workstation or +lookup table resource. +.RE +.SH +See Also +.RS +.LP +.PN PEXQueryEncodedTextExtents +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter13 b/xc/doc/specs/PEX5/PEXlib/chapter13 new file mode 100644 index 000000000..7337fbf4e --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter13 @@ -0,0 +1,319 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 13\fP\s-1 + +\s+1\fBPEX Escapes\fP\s-1 +.sp 2 +.nr H1 13 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 13: PEX Escapes +.XE +.LP +.PN PEXEscape +and +.PN PEXEscapeWithReply +are functions which provide a standard interface to implementation-dependent +or vendor specific requests. +.PN PEXSetEchoColor +is a convenience function for easy access to the one standard PEX escape. +.bp +.XS +Function Descriptions +.XE +.SH +PEXEscape - PEX Escape +.XS + PEXEscape +.XE +.IN "PEXEscape" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXEscape\^(\^Display *\fIdisplay\fP\^, unsigned long \fIescape_id\fP\^, int \fIlength\fP\^, char *\fIescape_data\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIescape_id\fP 1i +The escape identifier. +.IP \fIlength\fP 1i +The length, in bytes, of data for the escape request. +.IP \fIescape_data\fP 1i +A pointer to data for the escape request. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +.PN PEXEscape +has an implementation-dependent effect. It is provided as a way for +implementation-specific functionality to be accessed. The complete +interface and behavior for each specified escape identifier should be +specified by the individual PEX server implementation. +.LP +There is one standard PEX escape, see below. +.LP +If the specified escape identifier is not supported, +a value error is generated. +.LP +Standard PEX Escape: +.RS +.LP +.PN PEXEscapeSetEchoColor +is an escape to set the echo color for use by a renderer when echoing +primitives. +.PN PEXEscapeSetEchoColor +is the name of the escape identifier and is passed as the escape identifier +to +.PN PEXEscape. +The escape data for +.PN PEXEscapeSetEchoColor +consists of a renderer resource identifier (XID) followed by +a color specifier +.Pn ( PEXColorSpecifier ). +See the +.PN PEXSetEchoColor +function for further description of this standard escape. +.RE +.RE +.SH +Errors +.RS +.IP Escape-dependent 1i +See documentation provided with the individual PEX server implementation. +.IP \fIBadValue\fP 1i +The specified escape identifier is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXEscapeWithReply , +.PN PEXSetEchoColor +.RE +.bp +.SH +PEXEscapeWithReply - PEX Escape With Reply +.XS + PEXEscapeWithReply +.XE +.IN "PEXEscapeWithReply" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +char *PEXEscapeWithReply\^(\^Display *\fIdisplay\fP\^, unsigned long \fIescape_id\fP\^, int \fIlength\fP\^, char *\fIescape_data\fP\^, unsigned long *\fIreply_length_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIescape_id\fP 1i +The escape identifier. +.IP \fIlength\fP 1i +The length, in bytes, of data for the escape request. +.IP \fIescape_data\fP 1i +A pointer to data for the escape request. +.IP \fIreply_length_return\fP 1i +Returns the length, in bytes, of the reply data. +.RE +.SH +Returns +.RS +.LP +A pointer to the escape reply data; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +.PN PEXEscapeWithReply +has an implementation-dependent effect. It is similar to +.PN PEXEscape +except it has return data. +It is provided as a way for +implementation-specific functionality to be accessed. The complete +interface and behavior for each specified escape identifier should be +specified by the individual PEX server implementation. +.LP +There are no standard PEX escapes with replies. +.LP +If the specified escape identifier is not supported, +a value error is generated. +.LP +The reply data is returned in memory allocated by PEXlib. +.PN XFree +should be called to deallocate the memory. +.RE +.SH +Errors +.RS +.IP Escape-dependent 1i +See documentation provided with the individual PEX server implementation. +.IP \fIBadValue\fP 1i +The specified escape identifier is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXEscape +.RE +.bp +.SH +PEXSetEchoColor - PEX Escape to set Echo Color for Specified Renderer +.XS + PEXSetEchoColor +.XE +.IN "PEXSetEchoColor" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSetEchoColor\^(\^Display *\fIdisplay\fP\^, PEXRenderer \fIrenderer\fP\^, int \fIcolor_type\fP\^, PEXColor *\fIcolor\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP +call. +.IP \fIrenderer\fP 1i +The resource identifier of a renderer. +.IP \fIcolor_type\fP 1i +The type of color +.Pn ( PEXColorTypeIndexed , +.PN PEXColorTypeRGB , +.PN PEXColorTypeCIE , +.PN PEXColorTypeHSV , +.PN PEXColorTypeHLS , +.PN PEXColorTypeRGB8 , +.PN PEXColorTypeRGB16 ). +.IP \fIcolor\fP 1i +The echo color. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function is a convenient way to access the +.PN PEXEscapeSetEchoColor +escape to set the echo color for use by a renderer when echoing primitives. +.LP +A renderer's echo color can be changed at any time during rendering and is +not inquirable through the renderer's modification dynamics (see +.PN PEXGetRendererDynamics ). +Lighting and shading for echoed primitives is implementation-dependent. +A renderer's echo color can not be inquired and the default value is +implementation-dependent. +Support of this escape is inquirable via +.PN PEXGetEnumTypeInfo . +.RE +.SH +Data Structures +.ID +.Co +typedef XID PEXRenderer; +.sp +typedef union { + PEXColorIndexed indexed; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; +} PEXColor; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.sp +.ft P +.DE +.SH +Errors +.RS +.IP \fIBadPEXColorType\fP 1i +The specified color type is invalid or unsupported. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadValue\fP 1i +The +.PN PEXEscapeSetEchoColor +escape is unsupported. +.RE +.SH +See Also +.RS +.LP +.PN PEXEscape +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter14 b/xc/doc/specs/PEX5/PEXlib/chapter14 new file mode 100644 index 000000000..d17bd4eea --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter14 @@ -0,0 +1,271 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 14\fP\s-1 + +\s+1\fBOutput Command Encode and Decode\fP\s-1 +.sp 2 +.nr H1 14 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 14: Output Command Encode and Decode +.XE +.IN "encode" +.IN "decode" +.IN "output commands" +.LP +Some applications need to generate protocol-formatted output commands +for use in archives or client-side data storage. Likewise, the application +may need to decode the protocol-formatted output commands returned from +functions like +.PN PEXFetchElements . +The functions described in this chapter provide for these operations. +.LP +For complete information on protocol format, see the +\fIPEX Protocol Specification\fP and the \fIPEX Protocol Encoding\fP. +.LP +For the definition of the +.PN PEXOCData +data structure, see the PEXlib.h header file. +.bp +.XS +Function Descriptions +.XE +.SH +PEXCountOCs - Count Output Commands in an Encoded List +.XS + PEXCountOCs +.XE +.IN "PEXCountOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +unsigned long PEXCountOCs\^(\^int \fIfloat_format\fP\^, unsigned long \fIlength\fP\^, char *\fIencoded_ocs\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfloat_format\fP 1i +The floating point format of the encoded output commands +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIlength\fP 1i +The length, in bytes, of the encoded output commands. +.IP \fIencoded_ocs\fP 1i +A pointer to the encoded output commands. +.RE +.SH +Returns +.RS +.LP +The number of output commands represented in the encoded output commands. +.RE +.SH +Description +.RS +.LP +This function has no visible effect. This function returns +the number of output commands in the encoded list of output commands. +.LP +A count of zero will be returned if the specified floating point format is not +supported. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXDecodeOCs +.RE +.bp +.SH +PEXDecodeOCs - Decode Output Commands +.XS + PEXDecodeOCs +.XE +.IN "PEXDecodeOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXOCData *PEXDecodeOCs\^(\^int \fIfloat_format\fP\^, unsigned long \fIoc_count\fP\^, unsigned long \fIlength\fP\^, char *\fIencoded_ocs\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfloat_format\fP 1i +The floating point format of the encoded output commands +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIoc_count\fP 1i +The number of output commands represented in the encoded output commands. +.IP \fIlength\fP 1i +The length, in bytes, of the encoded output commands. +.IP \fIencoded_ocs\fP 1i +A pointer to the encoded output commands. +.RE +.SH +Returns +.RS +.LP +A pointer to the decoded output commands; a null pointer if unsuccessful or if zero output commands specified. +.RE +.SH +Description +.RS +.LP +This function has no visible effect. Encoded output commands are passed in +and the data typically passed as parameters to output attribute or primitive +functions is returned in memory allocated by PEXlib. +.PN PEXFreeOCData +should be called to deallocate the memory. +.LP +A null pointer will be returned if the specified floating point format is not +supported. +.LP +Any text or annotation text primitives are returned as encoded text or encoded +annotation text. +.LP +.PN PEXCountOCs +can be used to determine the number of output commands in the encoded list if +that information is not already available. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXEncodeOCs , +.PN PEXCountOCs +.RE +.bp +.SH +PEXEncodeOCs - Encode Output Commands +.XS + PEXEncodeOCs +.XE +.IN "PEXEncodeOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +char *PEXEncodeOCs\^(\^int \fIfloat_format\fP\^, unsigned long \fIoc_count\fP\^, PEXOCData *\fIoc_data\fP\^, unsigned long *\fIlength_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfloat_format\fP 1i +The floating point format for the encoded output commands +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIoc_count\fP 1i +The number of output commands to be encoded. +.IP \fIoc_data\fP 1i +An array of the output command data. +.IP \fIlength_return\fP 1i +Returns the length, in bytes, of the encoded output commands. +.RE +.SH +Returns +.RS +.LP +A pointer to the encoded output commands; a null pointer if unsuccessful or if zero output commands specified. +.RE +.SH +Description +.RS +.LP +This function has no visible effect. The data typically passed as parameters +to output attribute or primitive functions is passed in and encoded +into protocol formatted output commands. +The encoded data is returned in memory allocated by PEXlib. +.PN XFree +should be called to deallocate the memory. +.LP +A null pointer will be returned if the specified floating point format is not +supported. +.LP +Any text or annotation text primitives must be specified as encoded text or +encoded annotation text. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXDecodeOCs +.RE +.bp +.SH +PEXFreeOCData - Deallocate OC Data +.XS + PEXFreeOCData +.XE +.IN "PEXFreeOCData" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFreeOCData\^(\^unsigned long \fIcount\fP\^, PEXOCData *\fIoc_data\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of output commands. +.IP \fIoc_data\fP 1i +An array of output command data. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function deallocates memory allocated by PEXlib to hold +decoded output command data. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXDecodeOCs +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter15 b/xc/doc/specs/PEX5/PEXlib/chapter15 new file mode 100644 index 000000000..c14f12bb3 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter15 @@ -0,0 +1,458 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 15\fP\s-1 + +\s+1\fBSending Encoded Output Commands\fP\s-1 +.sp 2 +.nr H1 15 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 15: Sending Encoded Output Commands +.XE +.LP +Some applications have access to encoded output commands, such as +for archives or client-side data storage obtained via +.PN PEXEncodeOCs +or +.PN PEXFetchElements . +The functions described in this chapter provide a way for the application +to send this data directly instead of decoding the data and calling the +appropriate output primitive or attribute functions. +.LP +There are two ways provided for sending encoded output commands. The first is +.PN PEXSendOCs +which is useful if the application has the complete list of encoded output +commands available in contiguous memory. +The second is a set of functions: +.PN PEXStartOCs , +.PN PEXCopyBytesToOC , +.PN PEXGetOCAddr , +.PN PEXFinishOCs . +These are useful if the application has data which is already encoded or which +the application wishes to encode "on-the-fly", but which is not in contiguous +memory. +.PN PEXCopyBytesToOC +can be used to have PEXlib copy individual pieces which are in contiguous memory. +.PN PEXGetOCAddr +can be used to get an address where the application can copy data on its own. +Both of these functions copy data directly into the transport buffer, possibly +avoiding one data copy from the application data into a format necessary to +directly call the PEXlib output command functions. +.LP +None of these functions will convert floating point formats. It is up to the +application to determine which formats are supported by the PEX server and do +any necessary conversion on the data. For example, if the PEX server does not +support the floating point format native to the application's machine, the +application will have to convert any native float values into a format supported +by the PEX server. +.LP +For complete information on protocol format, see the +\fIPEX Protocol Specification\fP and the \fIPEX Protocol Encoding\fP. +.bp +.XS +Function Descriptions +.XE +.SH +PEXCopyBytesToOC - Copy Encoded Output Commands +.XS + PEXCopyBytesToOC +.XE +.IN "PEXCopyBytesToOC" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXCopyBytesToOC\^(\^Display *\fIdisplay\fP\^, int \fIlength\fP\^, char *\fIdata\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIlength\fP 1i +The number of bytes to copy. +.IP \fIdata\fP 1i +A pointer to the output command data. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function copies the specified number of bytes of data to the transport +buffer. +.LP +It is recommended that the number of bytes be a multiple of four as the +protocol format requires output commands to be aligned on four-byte boundaries. +It is the application's responsibility to ensure that alignment restrictions +are met. +.LP +.PN PEXStartOCs +must be called prior to this. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXStartOCs , +.PN PEXFinishOCs , +.PN PEXGetOCAddr +.RE +.bp +.SH +PEXGetOCAddr - Get Address For Encoded Output Commands +.XS + PEXGetOCAddr +.XE +.IN "PEXGetOCAddr" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +char *PEXGetOCAddr\^(\^Display *\fIdisplay\fP\^, int \fIlength\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIlength\fP 1i +The number of bytes of data to be written by the application. +.RE +.SH +Returns +.RS +.LP +A pointer to memory where the application can write output command data; a null pointer if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function returns a memory address to the specified number of bytes in +the transport buffer where the application can write data. +.LP +The pointer returned is valid only until the next +.PN PEXGetOCAddr +or +.PN PEXCopyBytesToOC +is called. +.LP +An attempt to request more bytes than remaining in the transport buffer, or +more bytes than returned by +.PN PEXGetOCAddrMaxSize , +will result in an unsuccessful return value. +.LP +.PN PEXStartOCs +must be called prior to this. +.LP +\fIDO NOT\fP attempt to deallocate or free memory at the address returned +by this function. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXStartOCs , +.PN PEXFinishOCs , +.PN PEXCopyBytesToOC , +.br +.PN PEXGetOCAddrMaxSize +.RE +.bp +.SH +PEXFinishOCs - Finish Encoded Output Commands +.XS + PEXFinishOCs +.XE +.IN "PEXFinishOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXFinishOCs\^(\^Display *\fIdisplay\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function should be called to complete the sending of +encoded output commands. The display connection is unlocked. +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXStartOCs , +.PN PEXCopyBytesToOC , +.PN PEXGetOCAddr +.RE +.bp +.SH +PEXSendOCs - Send Encoded Output Commands +.XS + PEXSendOCs +.XE +.IN "PEXSendOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXSendOCs\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIfloat_format\fP\^, unsigned long \fIoc_count\fP\^, unsigned int \fIlength\fP\^, char *\fIencoded_ocs\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIfloat_format\fP 1i +The floating point format of the encoded output commands +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIoc_count\fP 1i +The number of encoded output commands. +.IP \fIlength\fP 1i +The length, in bytes, of the encoded output commands. +.IP \fIencoded_ocs\fP 1i +A pointer to the encoded output commands. +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function sends encoded output commands to the specified PEX server display. +.LP +Sending output commands to a structure whose editing mode is +.PN PEXStructureReplace , +is not really useful. The behavior will be unpredictable +unless a request type of +.PN PEXOCStoreSingle +is used. And, if the request type is +.PN PEXOCStoreSingle , +each output command will simply replace the previous one sent. +Applications should ensure that the structure's editing mode is +.PN PEXStructureInsert , +when sending multiple output commands. If it is intended to replace multiple +elements, the application can delete those elements first, and then insert the +new ones. +.RE +.SH +Errors +.RS +.IP \fIBadPEXFloatingPointFormat\fP 1i +The specified floating point format is invalid or unsupported. +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXDecodeOCs , +.PN PEXEncodeOCs +.RE +.bp +.SH +PEXStartOCs - Start Encoded Output Commands +.XS + PEXStartOCs +.XE +.IN "PEXStartOCs" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +Status PEXStartOCs\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIfloat_format\fP\^, int \fIoc_count\fP\^, int \fIword_count\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.IP \fIresource_id\fP 1i +The resource identifier of the renderer or structure. +.IP \fIreq_type\fP 1i +The request type for the output command +.Pn ( PEXOCRender , +.PN PEXOCStore , +.PN PEXOCRenderSingle +or +.PN PEXOCStoreSingle ). +.IP \fIfloat_format\fP 1i +The floating point format of the output command data +.Pn ( PEXIEEE_754_32 , +.PN PEXDEC_F_Floating , +.PN PEXIEEE_754_64 , +.PN PEXDEC_D_Floating ). +.IP \fIoc_count\fP 1i +The number of output commands to be sent. +.IP \fIword_count\fP 1i +The number of four-byte words of data for the total size of the output commands. +.RE +.SH +Returns +.RS +.LP +Zero is unsuccessful, non-zero otherwise. +.RE +.SH +Description +.RS +.LP +This function locks the display. +Only +.PN PEXCopyBytesToOC +or +.PN PEXGetOCAddr +may be called +between pairs of +.PN PEXStartOCs +and +.PN PEXFinishOCs . +Do not call anything else that may lock the display as this will result in +deadlock. +.LP +The first output command is guaranteed to start on a four-byte boundary. +Output command data may be copied into the transport buffer by calling +.PN PEXCopyBytesToOC . +Output command data may be written directly by the application by calling +.PN PEXGetOCAddr +to get a pointer to memory in the transport buffer. +.LP +.PN PEXFinishOCs +must be called after all the data has been specified. +.LP +The application is responsible for writing valid protocol and the correct number +of words requested. +.LP +If the requested number of words is too large for the display connection +(each server has a maximum request size), the function will return +unsuccessfully. If this occurs, and the number of output commands was +greater than one, the application should try specifying the data for a +single output command at a time. +If the size of a single output command is too large for the display connection, +the function will return unsuccessfully. +.RE +.SH +Errors +.RS +.IP \fIBadPEXFloatingPointFormat\fP 1i +The specified floating point format is invalid or unsupported. +.IP \fIBadPEXOutputCommand\fP 1i +The output command contains an invalid value. +.IP \fIBadPEXRenderer\fP 1i +The specified renderer resource identifier is invalid. +.IP \fIBadPEXStructure\fP 1i +The specified structure resource identifier is invalid. +.RE +.SH +See Also +.RS +.LP +.PN PEXFinishOCs , +.PN PEXCopyBytesToOC , +.PN PEXGetOCAddr +.RE +.bp +.SH +PEXGetOCAddrMaxSize - Macro to Obtain the Maximum Size for PEXGetOCAddr +.XS + PEXGetOCAddrMaxSize +.XE +.IN "PEXGetOCAddrMaxSize" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +PEXGetOCAddrMaxSize\^(\^\fIdisplay\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIdisplay\fP 1i +A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call. +.RE +.SH +Description +.RS +.LP +This macro evaluates to the maximum size for the length parameter of +.PN PEXGetOCAddr . +.RE +.SH +Errors +.RS +.IP None 1i +.RE +.SH +See Also +.RS +.LP +.PN PEXGetOCAddr +.RE +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/chapter16 b/xc/doc/specs/PEX5/PEXlib/chapter16 new file mode 100644 index 000000000..9ac152ad6 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/chapter16 @@ -0,0 +1,3587 @@ +\& +.sp 1 +.ce 3 +\s+1\fBChapter 16\fP\s-1 + +\s+1\fBPEXlib Utilities\fP\s-1 +.sp 2 +.nr H1 16 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.XS +Chapter 16: PEXlib Utilities +.XE +.LP +This chapter gives the PEXlib utility functions. These functions can be used +to create transformation matrices for modeling and viewing, and to apply +those matrices to points and vectors. Utilities are also provided to compute +the geometric normals of multi-faceted output primitives. +.LP +There are four groups of functions: +.ID +.IP \s-2\(bu\s+2 2 +Modeling Transformation Utilities +.IP \s-2\(bu\s+2 2 +Viewing Transformation Utilities +.IP \s-2\(bu\s+2 2 +Miscellaneous Transformation Utilities +.IP \s-2\(bu\s+2 2 +Utilities for Computing Geometric Normals +.DE +.NH 2 +Modeling Transformation Utilities +.XS +\*(SN Modeling Transformation Utilities +.XE +.IN "utilities" "modeling transformation" +.LP +Each function in this group computes a transformation matrix that +performs a common modeling operation, such as a rotation or +translation, or composes two transforms. Included in this set are +the following functions: +.ID +.PN PEXRotate +.PN PEXRotate2D +.PN PEXRotateGeneral +.PN PEXScale +.PN PEXScale2D +.PN PEXTranslate +.PN PEXTranslate2D +.PN PEXMatrixMult +.PN PEXMatrixMult2D +.PN PEXBuildTransform +.PN PEXBuildTransform2D +.DE +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.sp +typedef struct { + float x; + float y; +} PEXVector2D; +.DE +/* matrices */ +.ID +typedef float PEXMatrix[4][4]; +typedef float PEXMatrix3x3[3][3]; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXRotate +.XS + PEXRotate +.XE +.IN "PEXRotate" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXRotate\^(\^int \fIaxis\fP, double \fIangle\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIaxis\fP 1i +one of +.PN PEXXAxis , +.PN PEXYAxis , +.PN PEXZAxis +.IP \fIangle\fP 1i +angle of the rotation in radians +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadAxis\fP - invalid axis value specified +.DE +.RE +.SH +Description +.RS +.LP +This function creates a rotation matrix about the specified axis. +.LP +The resulting matrix rotates by the angle specified in radians +about the origin. +.LP +The function returns unsuccessfully if axis is not one defined. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXRotate2D , +.PN PEXRotateGeneral +.RE +.bp +.SH +PEXRotate2D +.XS + PEXRotate2D +.XE +.IN "PEXRotate2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXRotate2D\^(\^double \fIangle\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIangle\fP 1i +angle of the rotation in radians +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +None. +.RE +.SH +Description +.RS +.LP +The resulting matrix rotates by the angle specified in radians +about the origin. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXRotate , +.PN PEXRotateGeneral +.RE +.bp +.SH +PEXRotateGeneral +.XS + PEXRotateGeneral +.XE +.IN "PEXRotateGeneral" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXRotateGeneral\^(\^PEXCoord *\fIpoint1\fP, PEXCoord *\fIpoint2\fP, double \fIangle\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIpoint1\fP 1i +endpoint of line segment defining rotation axis +.IP \fIpoint2\fP 1i +endpoint of line segment defining rotation axis +.IP \fIangle\fP 1i +angle of the rotation in radians +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadAxis\fP - the endpoints are coincident +.DE +.RE +.SH +Description +.RS +.LP +This routine formats a matrix for a right-handed rotation about an +arbitrary axis. The rotation axis is defined by the line segment +joining the two points. The angle is in radians and is measured +counter-clockwise when looking from the first point to second point along the +specified axis. +.LP +Returns unsuccessfully if the points are coincident. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXScale +.XS + PEXScale +.XE +.IN "PEXScale" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXScale\^(\^PEXVector *\fIscale_vector\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIscale_vector\fP 1i +vector containing the X, Y and Z scale factors +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Creates a scale matrix given the scale vector. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXScale2D +.RE +.bp +.SH +PEXScale2D +.XS + PEXScale2D +.XE +.IN "PEXScale2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXScale2D\^(\^PEXVector2D *\fIscale_vector\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIscale_vector\fP 1i +vector containing the X and Y scale factors +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Creates a 3X3 scale matrix given the scale vector. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXScale +.RE +.bp +.SH +PEXTranslate +.XS + PEXTranslate +.XE +.IN "PEXTranslate" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTranslate\^(\^PEXVector *\fItrans_vector\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItrans_vector\fP 1i +vector containing the X, Y and Z translation factors +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Creates a translation matrix that translates objects +by the given translation vector. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTranslate2D +.RE +.bp +.SH +PEXTranslate2D +.XS + PEXTranslate2D +.XE +.IN "PEXTranslate2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTranslate2D\^(\^PEXVector2D *\fItrans_vector\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItrans_vector\fP 1i +vector containing the X and Y translation factors +.IP \fImatrix_return\fP 1i +matrix into which rotation matrix is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Creates a 3X3 translation matrix that translates objects +by the given translation vector. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTranslate +.RE +.bp +.SH +PEXMatrixMult +.XS + PEXMatrixMult +.XE +.IN "PEXMatrixMult" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXMatrixMult\^(\^PEXMatrix \fImatrix1\fP, PEXMatrix \fImatrix2\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImatrix1\fP 1i +first matrix to be multiplied +.IP \fImatrix2\fP 1i +second matrix to be multiplied +.IP \fImatrix_return\fP 1i +matrix into which result is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Performs a matrix multiplication: matrix = matrix1 X matrix2 +.LP +If the return matrix is the same as one of the input matrices, the function will +overwrite the input values with the multiplied values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXMatrixMult2D +.RE +.bp +.SH +PEXMatrixMult2D +.XS + PEXMatrixMult2D +.XE +.IN "PEXMatrixMult2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXMatrixMult2D\^(\^PEXMatrix3x3 \fImatrix1\fP, PEXMatrix3x3 \fImatrix2\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fImatrix1\fP 1i +first matrix to be multiplied +.IP \fImatrix2\fP 1i +second matrix to be multiplied +.IP \fImatrix_return\fP 1i +matrix into which result is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +Performs a 3X3 matrix multiplication: matrix = matrix1 X matrix2. +.LP +If the return matrix is the same as one of the input matrices, the function will +overwrite the input values with the multiplied values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXMatrixMult +.RE +.bp +.SH +PEXBuildTransform +.XS + PEXBuildTransform +.XE +.IN "PEXBuildTransform" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBuildTransform\^(\^PEXCoord *\fIfixed_point\fP, PEXVector *\fItrans_vector\fP, double \fIangle_x\fP, double \fIangle_y\fP, double \fIangle_z\fP, PEXVector *\fIscale_vector\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfixed_point\fP 1i +origin for scaling and rotation +.IP \fItrans_vector\fP 1i +translation vector +.IP \fIangle_x\fP 1i +angle of rotation about X axis, in radians +.IP \fIangle_y\fP 1i +angle of rotation about Y axis, in radians +.IP \fIangle_z\fP 1i +angle of rotation about Z axis, in radians +.IP \fIscale_vector\fP 1i +vector of scale factors for X, Y and Z +.IP \fImatrix_return\fP 1i +matrix into which result is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function builds a transformation matrix that scales by the values +in the scale vector about the fixed point, rotates about the X, Y and Z +axes using the fixed point as the center of rotation and then +translates according to translation vector, in that order. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXBuildTransform2D +.RE +.bp +.SH +PEXBuildTransform2D +.XS + PEXBuildTransform2D +.XE +.IN "PEXBuildTransform2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXBuildTransform2D\^(\^PEXCoord2D *\fIfixed_point\fP, PEXVector2D *\fItrans_vector\fP, double \fIangle_z\fP, PEXVector2D *\fIscale_vector\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfixed_point\fP 1i +origin for scaling and rotation +.IP \fItrans_vector\fP 1i +translation vector +.IP \fIangle_z\fP 1i +angle of rotation about Z axis, in radians +.IP \fIscale_vector\fP 1i +vector of scale factors for X and Y axes +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function builds a 3X3 transformation matrix that scales +by the values in the scale vector about the fixed point, rotates +about Z axis using the fixed point as the center +of rotation and then translates according to translation vector, +in that order. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXBuildTransform +.RE +.bp +.NH 2 +Viewing Transformation Utilities +.XS +\*(SN Viewing Transformation Utilities +.XE +.IN "utilities" "viewing transformation" +.LP +These functions compute viewing transforms for the PHIGS +viewing model and a more simple viewing model. The +functions using the PHIGS viewing model are: +.ID +.PN PEXViewOrientationMatrix +.PN PEXViewOrientationMatrix2D +.PN PEXViewMappingMatrix +.PN PEXViewMappingMatrix2D +.DE +.LP +Those for the simple viewing model are: +.ID +.PN PEXLookAtViewMatrix +.PN PEXPolarViewMatrix +.PN PEXOrthoProjMatrix +.PN PEXPerspProjMatrix +.DE +The matrices returned by these functions can be passed to +PEXlib as viewing transforms. +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.sp +typedef struct { + float x; + float y; +} PEXVector2D; +.DE +/* matrices */ +.ID +typedef float PEXMatrix[4][4]; +typedef float PEXMatrix3x3[3][3]; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXViewOrientationMatrix +.XS + PEXViewOrientationMatrix +.XE +.IN "PEXViewOrientationMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXViewOrientationMatrix\^(\^PEXCoord *\fIvrp\fP, PEXVector *\fIvpn\fP, PEXVector *\fIvup\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvrp\fP 1i +view reference point +.IP \fIvpn\fP 1i +view plane normal +.IP \fIvup\fP 1i +view up vector +.IP \fImatrix_return\fP 1i +matrix into which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadVector\fP - either vpn or vup is zero length +\fBPEXBadVectors\fP - vup is parallel to vpn +.DE +.RE +.SH +Description +.RS +.LP +This function creates a view orientation matrix that +transforms world coordinates (WC) to view reference +coordinates (VRC). This matrix is used in conjunction with a view +mapping matrix as the viewing matrices for a designated view. +.LP +The view reference point (VRP) defines the point in world +coordinate space that is to be used as the origin of the +view reference coordinate system. +.LP +The view plane normal (VPN) is a 3D vector defined in world +coordinates relative to the view reference point. This +gives the direction of the positive Z axis of VRC. +.LP +The view up vector (VUP) is a 3D vector defined in +world coordinates relative to the view reference point. +The projection of this vector onto the plane through +the view reference point and perpendicular to the +view plane normal defines the Y axis of VRC. +.LP +The X axis of VRC is defined such that the VRC system +forms a right-handed coordinate system. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXViewOrientationMatrix2D , +.PN PEXViewMappingMatrix , +.PN PEXViewMappingMatrix2D +.RE +.bp +.SH +PEXViewOrientationMatrix2D +.XS + PEXViewOrientationMatrix2D +.XE +.IN "PEXViewOrientationMatrix2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXViewOrientationMatrix2D\^(\^PEXCoord2D *\fIvrp\fP, PEXVector2D *\fIvup\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIvrp\fP 1i +view reference point +.IP \fIvup\fP 1i +view up vector +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadVector\fP - vup is zero length. +.DE +.RE +.SH +Description +.RS +.LP +This function creates a view orientation matrix that +transforms world coordinates (WC) to view reference +coordinates (VRC). This matrix is used in conjunction with a view +mapping matrix as the viewing matrices for a designated view. +.LP +The view reference point (VRP) defines the point in world +coordinate space that is to be used as the origin of the +view reference coordinate system. The point is in +the WC z=0 plane. +.LP +The view plane normal (VPN) is in the direction of the positive +Z axis of WC. +.LP +The view up vector (VUP) is a 2D vector in the WC z=0 plane. +It determines the positive Y axis of VRC. It's defined in +world coordinates relative to the view reference point. +.LP +The X axis of VRC is defined such that the VRC system +forms a right-handed coordinate system. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXViewOrientationMatrix , +.PN PEXViewMappingMatrix , +.PN PEXViewMappingMatrix2D +.RE +.bp +.SH +PEXViewMappingMatrix +.XS + PEXViewMappingMatrix +.XE +.IN "PEXViewMappingMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXViewMappingMatrix\^(\^PEXCoord2D *\fIframe\fP, PEXNPCSubVolume *\fIviewport\fP, int \fIperspective\fP, PEXCoord *\fIprp\fP, double \fIview_plane\fP, double \fIback_plane\fP, double \fIfront_plane\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIframe\fP 1i +array of 2 2D VRC locations which mark a rectangle in the view plane +.IP \fIviewport\fP 1i +NPC viewport into which the frame gets mapped +.IP \fIperspective\fP 1i +flag to indicate whether a perspective view is desired, a value of +.PN True +requests that perspective be applied +.IP \fIprp\fP 1i +projection reference point +.IP \fIview_plane\fP 1i +VRC position of view plane w.r.t. the VRP +.IP \fIback_plane\fP 1i +VRC position of the back plane w.r.t. the VRP +.IP \fIfront_plane\fP 1i +VRC position of the front plane w.r.t. the VRP +.IP \fImatrix_return\fP 1i +matrix into which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadLimits\fP +\fBPEXBadViewport\fP +\fBPEXBadPlanes\fP +\fBPEXBadPRP\fP +.DE +.RE +.SH +Description +.RS +.LP +This function creates a view mapping matrix that transforms +a volume specified in view reference coordinates (VRC) to a +volume in normalized projection coordinates (NPC). This +matrix is used in conjunction with a view orientation matrix +as the viewing matrices for a designated view. +.LP +The axes of VRC form a right-handed coordinate system. +The z axis is along the VPN (view plane normal, see +.PN PEXViewOrientation ), +The Y axis is fixed by VUP, and +the X axis is determined so that the three axes form a right- +handed coordinate system. +.LP +The front plane, back plane, and view plane all define +planes in VRC parallel to the VRC x-y plane. The location of +front_plane and back_plane along the z axis of VRC defines +the front and back of the volume of VRC that will be mapped +to the specified NPC viewport. The view plane locates the +view frame or "window" on the VRC z axis. The two points in +frame determine the size of the view window by specifying +lower left (frame[0]) and upper right (frame[1]) x and y VRC +points of the window on the view plane. These values taken +together establish the volume of VRC space that is mapped +into the NPC viewport. +.LP +The type of projection may be parallel or perspective. The +projection reference point (PRP) orients the projectors +defining the surfaces of the view volume. If perspective +indicator is +.PN False , +then the projection type is parallel and +the projectors are all parallel to the vector joining the +projection reference point and the center of the view window +(located on the view plane). If perspective is +.PN True , +then +the projectors all converge at the projection reference +point. Thus, the view volume is a parallelpiped for +parallel views, and a truncated pyramid for perspective views. +.LP +When specifying NPC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXViewMappingMatrix2D , +.PN PEXViewOrientationMatrix , +.PN PEXViewOrientationMatrix2D +.RE +.bp +.SH +PEXViewMappingMatrix2D +.XS + PEXViewMappingMatrix2D +.XE +.IN "PEXViewMappingMatrix2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXViewMappingMatrix2D\^(\^PEXCoord2D *\fIframe\fP, PEXCoord2D *\fIviewport\fP, PEXMatrix3x3 \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIframe\fP 1i +array of 2 2D VRC locations which mark a rectangle to be mapped into the NPC subvolume. +.IP \fIviewport\fP 1i +array of 2 2D NPC coordinates with z = 0 specifying lower left and upper right of the "viewport". +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadLimits\fP +\fBPEXBadViewport\fP +.DE +.RE +.SH +Description +.RS +.LP +This function is a 2D shorthand version of +.PN PEXViewMappingMatrix +with the following parameters assumed: +.ID +front plane distance = 1 +back plane distance = 0 +view plane distance = 0 +viewport z range = [0,1] +projection type = parallel +x-y coordinates of projection reference point = center of view window, + z coordinate = 1.0. +.DE +.LP +When specifying NPC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXViewMappingMatrix , +.PN PEXViewOrientationMatrix , +.PN PEXViewOrientationMatrix2D +.RE +.bp +.SH +PEXLookAtViewMatrix +.XS + PEXLookAtViewMatrix +.XE +.IN "PEXLookAtViewMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXLookAtViewMatrix\^(\^PEXCoord *\fIfrom\fP, PEXCoord *\fIto\fP, PEXVector *\fIup\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfrom\fP 1i +Viewing position, in world coordinates. +.IP \fIto\fP 1i +Look at position, in world coordinates. +.IP \fIup\fP 1i +Vector representing the "up" direction, in world coordinates. +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadVectors\fP - the from and to arguments are equal, or the line between +them is parallel with the up vector +\fBPEXBadVector\fP - up is zero length +.DE +.RE +.SH +Description +.RS +.LP +This function creates a view orientation transform that defines the viewing +direction and orientation. It is a slightly more intuitive interface to +.PN PEXViewOrientationMatrix . +.LP +The "from" position defines the viewpoint, and the "to" position +specifies the point being viewed. These two parameters together define the +view reference point (the VRC origin) and the view plane normal of +.PN PEXViewOrientationMatrix . +The view reference point is the "to" point; the view plane normal is the vector +from "to" to "from". +.LP +The view up vector is a 3D vector defined in world coordinates relative to the +"to" point. The projection of this vector onto the plane through the "to" +point and perpendicular to the view plane normal defines the Y axis of VRC. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXPolarViewMatrix , +.PN PEXViewOrientationMatrix , +.PN PEXViewMappingMatrix +.RE +.bp +.SH +PEXPolarViewMatrix +.XS + PEXPolarViewMatrix +.XE +.IN "PEXPolarViewMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXPolarViewMatrix\^(\^PEXCoord *\fIfrom\fP, double \fIdistance\fP, double \fIazimuth\fP, double \fIaltitude\fP, double \fItwist\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfrom\fP 1i +The viewing position. +.IP \fIdistance\fP 1i +The distance between the `from' position and the position being viewed. +.IP \fIazimuth\fP 1i +The angle in the x,z plane from the +z axis to the line of sight, in radians. Positive values are counter-clockwise when viewed from the positive `y' axis. +.IP \fIaltitude\fP 1i +The angular inclination of the line of sight from the `x',`z' plane. The `altitude' argument is the angle in radians. Positive values are towards the positive `y' axis. +.IP \fItwist\fP 1i +The up direction of the view, given as an angle, in radians, about the line of +sight. Positive values of twist are in the counter-clockwise direction. +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadDistance\fP +.DE +.RE +.SH +Description +.RS +.LP +This routine formats a polar view orientation matrix. This routine is +similar to +.PN PEXLookAtViewMatrix , +except that the viewing parameters +are specified in spherical coordinates. +The "from" position defines one end of the view plane normal; the position +indicated by "distance", "azimuth", and "altitude" define the base of the +view plane normal, and the origin of VRC. +.LP +The view is defined with respect to the `from' position (the +viewing position) and the distance between it and the position being +viewed. The azimuth angle specifies the direction of the line of +sight going toward the position being viewed. +Positive values of azimuth are counter-clockwise when viewed from the +positive y axis. +.LP +The azimuth and altitude angles apply to the coordinate system +with `from' at the origin and the line of sight emanating from it. The +azimuth specifies the angle between the line of sight and +the +z axis, and the altitude defines the angle between +it and the x,z plane. +.LP +When applied, the transformation places the viewing position at the +origin, aligns the viewpoint with the +z axis, applies any +twist to the coordinates, and then places the viewed point at the +origin. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXLookAtViewMatrix , +.PN PEXViewOrientationMatrix , +.PN PEXViewMappingMatrix +.RE +.bp +.SH +PEXOrthoProjMatrix +.XS + PEXOrthoProjMatrix +.XE +.IN "PEXOrthoProjMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXOrthoProjMatrix\^(\^double \fIheight\fP, double \fIaspect\fP, double \fInear\fP, double \fIfar\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIheight\fP 1i +The height of the orthographic viewing box. +.IP \fIaspect\fP 1i +The aspect ratio (width/height) of the orthographic viewing box. +.IP \fInear\fP 1i +The distance, in view reference coordinates, from the VRC origin to the front clipping plane. +.IP \fIfar\fP 1i +The distance, in view reference coordinates, from the VRC origin to the back clipping plane. +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadLimits\fP - the viewing box depth, width, or height is zero. +.DE +.RE +.SH +Description +.RS +.LP +This routine formats a view mapping matrix. +.LP +A projection matrix defines a visible region of the coordinate space. +An orthographic projection defines the visible region as a box +specified by its height, width (the height multiplied by the aspect), and +its near and far boundaries. +.LP +The reference point for the projection is the origin of VRC; the near and +far clipping planes are defined with respect to it. The height is +defined in view reference coordinates. Clipping at the +planes is controlled by the clipping flags in the selected view table +entry. +.RE +.SH +Errors +.SH +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXLookAtViewMatrix , +.PN PEXViewOrientationMatrix , +.PN PEXViewMappingMatrix , +.br +.PN PEXPerspProjMatrix +.RE +.bp +.SH +PEXPerspProjMatrix +.XS + PEXPerspProjMatrix +.XE +.IN "PEXPerspProjMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXPerspProjMatrix\^(\^double \fIfovy\fP, double \fIdistance\fP, double \fIaspect\fP, double \fInear\fP, double \fIfar\fP, PEXMatrix \fImatrix_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfovy\fP 1i +Field of view (in radians) in the horizontal direction. +.IP \fIdistance\fP 1i +The distance to the eye-point. +.IP \fIaspect\fP 1i +The aspect ratio (width/height) of the perspective viewing frustum. +.IP \fInear\fP 1i +The distance to the near clipping plane. +.IP \fIfar\fP 1i +The distance to the far clipping plane. +.IP \fImatrix_return\fP 1i +matrix in which result is stored +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadLimits\fP - near <= far, fovy = 0, aspect = 0, or distance <= near +.DE +.RE +.SH +Description +.RS +.LP +This routine formats a view mapping matrix. +.LP +A projection matrix defines the visible region of the coordinate +space. +A perspective projection defines the visible region as a truncated +pyramid or frustum. The amount of perspective in the projection is +specified by the field of view argument, `fovy'. +The perspective increases as the angle increases to +a value of pi radians. +.LP +The distance between the eye-point and the origin +is specified by the distance. If the application +program calls +.PN PEXLookAtViewMatrix +to calculate the view +orientation matrix, the distance is typically the distance between +the `from' and `to' points specified to that routine. +If the application program calls +.PN PEXPolarViewMatrix +to calculate the +view orientation matrix, the distance is typically the same +distance specified to that routine. +.LP +The height of the frustum at the near clipping +plane is determined by `fovy' and the distance to the near plane. +The width of the frustum is determined from the aspect ratio. +.LP +The reference point for the projection is the origin of VRC; the near and far +clipping planes are defined with respect to it. Clipping at the +planes is controlled by the clip flags in the selected view table +entry. +.LP +It is useful to think of +.PN PEXPerspProjMatrix +as defining a +camera. The object being viewed is defined near the +origin. The lens is defined by `fovy'; +a larger value of `fovy' defines +a wide angle lens. For those who wish to keep the height at the +near plane constant and automatically back up the camera to frame the +subject, the relationship between the field of view, the eye distance, which is the +distance between the eye-point and the near plane, and the height, +which is the height at the near plane, is: +.ID +tan (fovy/2) = ( (height/2) / eye_distance) +.DE +.LP +For example, if a unit cube is being viewed, a "look at" view with +the `to' point at the center of the cube or a "polar" +view with the viewed point +at the center of the cube, places the cube +at the origin. A matrix created by +.PN PEXPerspProjMatrix +with +aspect = 1, near = 0.5, and far = -0.5 makes the +entire cube visible, with the field of view and distance controlling the amount +of perspective applied. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXLookAtViewMatrix , +.PN PEXViewOrientationMatrix , +.PN PEXViewMappingMatrix , +.br +.PN PEXOrthoProjMatrix +.RE +.bp +.NH 2 +Miscellaneous Transformation Utilities +.XS +\*(SN Miscellaneous Transformation Utilities +.XE +.IN "utilities" "miscellaneous transformation" +.LP +This set of functions computes various useful transforms +and applies transforms to points and vectors. Included +in this set are: +.ID +.PN PEXTransformPoints +.PN PEXTransformPoints2D +.PN PEXTransformPoints4D +.PN PEXTransformPoints2DH +.PN PEXTransformVectors +.PN PEXTransformVectors2D +.PN PEXNormalizeVectors +.PN PEXNormalizeVectors2D +.PN PEXInvertMatrix +.PN PEXInvertMatrix2D +.PN PEXIdentityMatrix +.PN PEXIdentityMatrix2D +.PN PEXNPCToXCTransform +.PN PEXNPCToXCTransform2D +.PN PEXXCToNPCTransform +.PN PEXXCToNPCTransform2D +.PN PEXMapXCToNPC +.PN PEXMapXCToNPC2D +.DE +.PN PEXMapXCToNPC +or +.PN PEXMapXCToNPC2D +can be used to find the PEX view +containing a drawable coordinate (XC) point. +.PN PEXNPCToXCTransform +and +.PN PEXNPCToXCTransform2D +computes the matrix representing +the transformation from the NPC subvolume through the DC +viewport and on to drawable coordinates. +.PN PEXXCToNPCTransform +and +.PN PEXXCToNPCTransform2D +computes the inverse of this transformation. These +functions can be used to transform points from NPC to XC and +back, using the same transformation used by a PEX renderer or +a PHIGS workstation resource. +.LP +As an example of using these functions, a list of modeling +coordinate points could be transformed to drawable +coordinates by the following sequence: +.ID +.IP \s-2\(bu\s+2 2 +Concatenate the local and global modeling transforms +.IP "" 4 +\fBPEXMatrixMult\fP( C = G x L ) +.IP \s-2\(bu\s+2 2 +Concatenate the viewing transforms +.IP "" 4 +\fBPEXMatrixMult\fP( V = M x O ) +.IP \s-2\(bu\s+2 2 +Concatenate the composite modeling and viewing transforms +.IP "" 4 +\fBPEXMatrixMult\fP( A = V x C ) +.IP \s-2\(bu\s+2 2 +Compute the NPC to XC transform +.IP "" 4 +\fBPEXNPCToXCTransform\fP( = W ) +.IP \s-2\(bu\s+2 2 +Concatenate that with the matrix from step c +.IP "" 4 +\fBPEXMatrixMult\fP( T = W x A ) +.IP \s-2\(bu\s+2 2 +Apply the composite transform +.IP "" 4 +\fBPEXTransformPoints\fP( P' = T x P ) +.DE +.LP +By performing this operation in several steps, the +application can precompute the matrices and apply them to +several sets of points, at the same time skipping any steps +that are unimportant. +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.sp +typedef struct { + float x; + float y; + float z; + float w; +} PEXCoord4D; +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.sp +typedef struct { + float x; + float y; +} PEXVector2D; +.DE +/* matrices */ +.ID +typedef float PEXMatrix[4][4]; +typedef float PEXMatrix3x3[3][3]; +.DE +/* device coordinates, viewports and views */ +.ID +typedef struct { + PEXCoord min; + PEXCoord max; +} PEXNPCSubVolume; +.sp +typedef struct { + short x; + short y; + float z; +} PEXDeviceCoord; +.sp +typedef struct { + short x; + short y; +} PEXDeviceCoord2D; +.sp +typedef struct { + unsigned short clip_flags; + unsigned short reserved; + PEXNPCSubVolume clip_limits; + PEXMatrix orientation; + PEXMatrix mapping; +} PEXViewEntry; +.DE +.ft P +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXTransformPoints +.XS + PEXTransformPoints +.XE +.IN "PEXTransformPoints" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXTransformPoints\^(\^PEXMatrix \fItransform\fP, int \fIcount\fP, PEXCoord *\fIpoints\fP, PEXCoord *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the points +.IP \fIcount\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of 3D points to transform +.IP \fIpoints_return\fP 1i +A pointer to an array in which to store the transformed points +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadHomoCoord\fP - one or more of the transformed points has a homogeneous coordinate of 0. +.DE +.RE +.SH +Description +.RS +.LP +This function applies the specified homogeneous +transformation matrix to the list of points. In applying +the transformation, the points are first converted to +homogeneous points by assigning them a homogeneous +coordinate of 1. The transformation is then applied: +.ID +P' = TxP +.DE +Where P is the point, treated as a column vector, and T is the +transformation matrix. The points are then mapped to 3D by +dividing their first three coordinates by the computed +homogeneous coordinate. +.LP +If the function returns unsuccessfully, all points other than those with a +homogeneous coordinate of 0 will be transformed and returned. +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformPoints2D , +.PN PEXTransformPoints4D , +.PN PEXTransformPoints2DH +.RE +.bp +.SH +PEXTransformPoints2D +.XS + PEXTransformPoints2D +.XE +.IN "PEXTransformPoints2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXTransformPoints2D\^(\^PEXMatrix3x3 \fItransform\fP, int \fIcount\fP, PEXCoord2D *\fIpoints\fP, PEXCoord2D *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the points +.IP \fIcount\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of 2D points to transform +.IP \fIpoints_return\fP 1i +A pointer to an array in which to store the transformed points +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadHomoCoord\fP - one or more of the transformed points has a homogeneous coordinate of 0. +.DE +.RE +.SH +Description +.RS +.LP +This function applies the specified homogeneous +transformation matrix to the list of points. In applying +the transformation, the points are first converted to +homogeneous points by assigning them a homogeneous +coordinate of 1. The transformation is then applied: +.ID +P' = TxP +.DE +Where P is the point, treated as a column vector, and T is the +transformation matrix. The points are then mapped to 2D by +dividing their first three coordinates by the computed +homogeneous coordinate. +.LP +If the function returns unsuccessfully, all points other than those with a +homogeneous coordinate of 0 will be transformed and returned. +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformPoints , +.PN PEXTransformPoints4D , +.PN PEXTransformPoints2DH +.RE +.bp +.SH +PEXTransformPoints4D +.XS + PEXTransformPoints4D +.XE +.IN "PEXTransformPoints4D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTransformPoints4D\^(\^PEXMatrix \fItransform\fP, int \fIcount\fP, PEXCoord4D *\fIpoints\fP, PEXCoord4D *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the points +.IP \fIcount\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of 4D points to transform +.IP \fIpoints_return\fP 1i +A pointer to an array in which to store the transformed points +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function applies the specified homogeneous transformation +matrix to the list of 3D homogeneous points (P = x, y, z, w). +The transformation is applied: +.ID +P' = TxP +.DE +Where P is the point, treated as a column vector, and T is the +transformation matrix. The function returns P' = (x', y', z', w'). +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.PN PEXTransformPoints , +.PN PEXTransformPoints2D , +.PN PEXTransformPoints2DH +.RE +.bp +.SH +PEXTransformPoints2DH +.XS + PEXTransformPoints2DH +.XE +.IN "PEXTransformPoints2DH" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTransformPoints2DH\^(\^PEXMatrix3x3 \fItransform\fP, int \fIcount\fP, PEXCoord *\fIpoints\fP, PEXCoord *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the points +.IP \fIcount\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of 2D homogeneous points to transform +.IP \fIpoints_return\fP 1i +A pointer to an array in which to store the transformed points +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function applies the specified homogeneous transformation +matrix to the list of 2D homogeneous points (P = x, y, w). The +transformation is applied: +.ID +P' = TxP +.DE +Where P is the point, treated as a column vector, and T is the +transformation matrix. The function returns P' = (x', y', w'). +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.PN PEXTransformPoints , +.PN PEXTransformPoints2D , +.PN PEXTransformPoints4D +.RE +.bp +.SH +PEXTransformVectors +.XS + PEXTransformVectors +.XE +.IN "PEXTransformVectors" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTransformVectors\^(\^PEXMatrix \fItransform\fP, int \fIcount\fP, PEXVector *\fIvectors\fP, PEXVector *\fIvectors_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the vectors +.IP \fIcount\fP 1i +The number of vectors to transform +.IP \fIvectors\fP 1i +A pointer to the array of 3D vectors to transform +.IP \fIvectors_return\fP 1i +A pointer to an array in which to store the transformed vectors +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function applies the upper 3x3 submatrix of the +specified transformation matrix to the list of 3D vectors. +The transformation is applied: +.ID +V' = T'xV +.DE +Where V is the vector, treated as a column vector, and T' is +the upper 3x3 sub-matrix of "transform." +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformVectors2D , +.PN PEXNormalizeVectors +.RE +.bp +.SH +PEXTransformVectors2D +.XS + PEXTransformVectors2D +.XE +.IN "PEXTransformVectors2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXTransformVectors2D\^(\^PEXMatrix3x3 \fItransform\fP, int \fIcount\fP, PEXVector2D *\fIvectors\fP, PEXVector2D *\fIvectors_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to apply to the vectors +.IP \fIcount\fP 1i +The number of vectors to transform +.IP \fIvectors\fP 1i +A pointer to the array of 2D vectors to transform +.IP \fIvectors_return\fP 1i +A pointer to an array in which to store the transformed vectors +.RE +.SH +Returns +.RS +.LP +None +.RE +.SH +Description +.RS +.LP +This function applies the upper 2x2 submatrix of the +specified transformation matrix to the list of 2D vectors. +The transformation is applied: +.ID +V' = T'xV +.DE +Where V is the vector, treated as a column vector, and T' is +the upper 2x2 sub-matrix of "transform." +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the transformed values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformVectors , +.PN PEXNormalizeVectors2D +.RE +.bp +.SH +PEXNormalizeVectors +.XS + PEXNormalizeVectors +.XE +.IN "PEXNormalizeVectors" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXNormalizeVectors\^(\^int \fIcount\fP, PEXVector *\fIvectors\fP, PEXVector *\fIvectors_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of vectors to normalize +.IP \fIvectors\fP 1i +A pointer to the array of vectors to normalize +.IP \fIvectors_return\fP 1i +A pointer to an array in which to store the normalized vectors +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadVector\fP - One of the vectors has zero magnitude. +.DE +.RE +.SH +Description +.RS +.LP +This function normalizes each vector in the specified list of +3D vectors. An error is returned if any vector in the list has +a magnitude of zero. All non-zero vectors in the list are still +normalized, however. +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the normalized values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformVectors , +.PN PEXNormalizeVectors2D +.RE +.bp +.SH +PEXNormalizeVectors2D +.XS + PEXNormalizeVectors2D +.XE +.IN "PEXNormalizeVectors2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXNormalizeVectors2D\^(\^int \fIcount\fP, PEXVector2D *\fIvectors\fP, PEXVector2D *\fIvectors_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIcount\fP 1i +The number of vectors to normalize +.IP \fIvectors\fP 1i +A pointer to the array of vectors to normalize +.IP \fIvectors_return\fP 1i +A pointer to an array in which to store the normalized vectors +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadVector\fP - One of the vectors has zero magnitude. +.DE +.RE +.SH +Description +.RS +.LP +This function normalizes each vector in the specified list of +2D vectors. An error is returned if any vector in the list has +a magnitude of zero. All non-zero vectors in the list are still +normalized, however. +.LP +If the return array is the same as the input array, the function will +overwrite the input values with the normalized values. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXTransformVectors2D , +.PN PEXNormalizeVectors +.RE +.bp +.SH +PEXNPCToXCTransform +.XS + PEXNPCToXCTransform +.XE +.IN "PEXNPCToXCTransform" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXNPCToXCTransform\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fItransform_return\fP 1i +The returned transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +\fBPEXBadSubVolume\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +.DE +.RE +.SH +Description +.RS +.LP +This function computes the transformation matrix to map an +NPC point to a drawable coordinate (XC), using the specified +NPC subvolume, DC viewport, and drawable height. The returned +transformation matrix first applies the subvolume-to-viewport +transformation, then transforms the x and y coordinates of +the resulting points to drawable coordinates, leaving the z +coordinate in DC. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXNPCToXCTransform2D +.RE +.bp +.SH +PEXNPCToXCTransform2D +.XS + PEXNPCToXCTransform2D +.XE +.IN "PEXNPCToXCTransform2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXNPCToXCTransform2D\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord2D *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix3x3 \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fItransform_return\fP 1i +The returned transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +\fBPEXBadSubVolume\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +.DE +.RE +.SH +Description +.RS +.LP +This function computes the 2D transformation matrix to map a +2D NPC point to a 2D drawable coordinate (XC), using the +specified NPC subvolume, DC viewport, and drawable height. +The returned transformation matrix first applies the +subvolume-to-viewport transformation, then transform the +resulting points to drawable coordinates. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXNPCToXCTransform +.RE +.bp +.SH +PEXXCToNPCTransform +.XS + PEXXCToNPCTransform +.XE +.IN "PEXXCToNPCTransform" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXXCToNPCTransform\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fItransform_return\fP 1i +The returned transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +\fBPEXBadSubVolume\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +.DE +.RE +.SH +Description +.RS +.LP +This function computes a transformation matrix to map a +drawable point (XC) to NPC coordinates, using the specified +NPC subvolume, DC viewport, and drawable height. The returned +transformation matrix first transforms the x and y coordinates +of points to device coordinates (DC), leaving the z coordinate +unmodified. It then applies the viewport-to-subvolume +transformation to all coordinates of the resulting points, +producing 3D NPC points. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXXCToNPCTransform2D +.RE +.bp +.SH +PEXXCToNPCTransform2D +.XS + PEXXCToNPCTransform2D +.XE +.IN "PEXXCToNPCTransform2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXXCToNPCTransform2D\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord2D *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix3x3 \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fItransform_return\fP 1i +The returned transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +\fBPEXBadSubVolume\fP - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) +.DE +.RE +.SH +Description +.RS +.LP +This function computes the 2D transformation matrix to map a +drawable point (XC) to NPC coordinates, using the specified +NPC subvolume, DC viewport, and drawable height. The returned +transformation matrix first transforms the x and y coordinates +of drawable points to device coordinates (DC), then applies +the 2D components of the viewport-to-subvolume transformation, +producing 2D NPC points. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXXCToNPCTransform +.RE +.bp +.SH +PEXMapXCToNPC +.XS + PEXMapXCToNPC +.XE +.IN "PEXMapXCToNPC" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXMapXCToNPC\^(\^int \fIpoint_count\fP, PEXDeviceCoord2D *\fIpoints\fP, unsigned int \fIwindow_height\fP, double \fIz_dc\fP, PEXDeviceCoord *\fIviewport\fP, PEXNPCSubVolume *\fInpc_sub_volume\fP, int \fIview_count\fP, PEXViewEntry *\fIviews\fP, int *\fIview_return\fP, int *\fIcount_return\fP\^, PEXCoord *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIpoint_count\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of points to transform. The X and Y coordinates of these points are in drawable coordinates (XC). The Z coordinate is in device coordinates (DC). +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fIz_dc\fP 1i +The z DC coordinate to assign the drawable points when converting them to DC. +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIview_count\fP 1i +The number of views to search +.IP \fIviews\fP 1i +The view entries to search for inclusion of the transformed points +.IP \fIview_return\fP 1i +Returns the view found to contain the most points +.IP \fIcount_return\fP 1i +Returns the number of points contained in the returned view, or the number of +points transformed if no views are specified. +.IP \fIpoints_return\fP 1i +Returns a pointer to an array in which to store the transformed points. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP +\fBPEXBadSubVolume\fP +.DE +.RE +.SH +Description +.RS +.LP +This function maps a list of drawable coordinates (XC) to +NPC, and searches a specified list of view entries to +determine the view containing the computed NPC points. +.LP +The XC points are first transformed to DC, using the +specified window height and assigning them the specified z DC value. +They are then transformed to NPC by the +viewport-to-subvolume transform implied by the specified viewport and +NPC subvolume. The specified list of views is then searched, +in order from 0 to the number of views minus 1, and the index of the first +view containing all the NPC points is returned. If no view +contains all the points, then the lowest-index view containing +the most points is returned. In this case, only the points +within the view are returned in "points_ret." +.LP +When determining the containing view, only the clipping limits +of the view are considered, with no consideration given to the +clipping flags or the viewing transforms. +.LP +If no views are specified, the XC points +are simply transformed to NPC points and returned. The +value of the returned view is undefined in this case. +.LP +The viewport-to-subvolume transformation maps to NPC the largest +region of the specified viewport that has the same aspect ratio as +the NPC subvolume and is anchored at the back lower-left of the +viewport (the corner of the viewport with the minimum X, Y and +Z coordinates). Points that lie outside this region of the +viewport are not transformed. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXMapXCToNPC2D , +.PN PEXNPCToXCTransform +.PN PEXXCToNPCTransform +.RE +.bp +.SH +PEXMapXCToNPC2D +.XS + PEXMapXCToNPC2D +.XE +.IN "PEXMapXCToNPC2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXMapXCToNPC2D\^(\^int \fIpoint_count\fP, PEXDeviceCoord2D *\fIpoints\fP, unsigned int \fIwindow_height\fP, PEXDeviceCoord2D *\fIviewport\fP, PEXNPCSubVolume *\fInpc_sub_volume\fP, int \fIview_count\fP, PEXViewEntry *\fIviews\fP, int *\fIview_return\fP, int *\fIcount_return\fP\^, PEXCoord2D *\fIpoints_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fIpoint_count\fP 1i +The number of points to transform +.IP \fIpoints\fP 1i +A pointer to an array of drawable-coordinate (XC) points to transform. +.IP \fIwindow_height\fP 1i +The height of the drawable +.IP \fIviewport\fP 1i +An array of two device coordinate points defining a viewport, typically that +of a renderer resource. The first point in the array is the lower-left corner +of the viewport; the second point is the upper-right. +.IP \fInpc_sub_volume\fP 1i +A pointer to an NPC subvolume, typically that of a renderer resource +.IP \fIview_count\fP 1i +The number of views to search +.IP \fIviews\fP 1i +The view entries to search for inclusion of the transformed points +.IP \fIview_return\fP 1i +The view found to contain the most points +.IP \fIcount_return\fP 1i +Returns the number of points contained in the returned view, or the number of +points transformed if no views are specified. +.IP \fIpoints_return\fP 1i +A pointer to an array in which to store the transformed points. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +\fBPEXBadViewport\fP +\fBPEXBadSubVolume\fP +.DE +.RE +.SH +Description +.RS +.LP +This function maps a list of drawable coordinates (XC) to +NPC, and searches a specified list of view entries to +determine the view containing the computed NPC points. +.LP +The XC points are first transformed to 2D DC, using the +specified window height, then transformed to 2D NPC by the +viewport-to-subvolume transform implied by the specified viewport and +NPC subvolume. The specified list of views is then searched, +in order from 0 to the number of views minus 1, and the index of the first +view containing all the NPC points is returned. If no view +contains all the points, then the lowest-index view containing +the most points is returned. In this case, only the points +within the view are returned. +.LP +When determining the containing view, only the x-y clipping +limits of the view are considered, with no consideration given +to the front and back clipping limits, the clipping flags, or +the viewing transforms. +.LP +If no views are specified, the XC points +are simply transformed to NPC points and returned. The +value of the returned view is undefined in this case. +.LP +The viewport-to-subvolume transformation maps to NPC the largest +region of the specified viewport that has the same aspect ratio as +the NPC subvolume and is anchored at the back lower-left of the +viewport (the corner of the viewport with the minimum X, Y and +Z coordinates). Points that lie outside this region of the +viewport are not transformed. +.LP +When specifying NPC and DC, the X, Y and Z limits must be as follows: +.ID +xmin < xmax , ymin < ymax , zmin <= zmax +.DE +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXMapXCToNPC , +.PN PEXNPCToXCTransform2D +.PN PEXXCToNPCTransform2D +.RE +.bp +.SH +PEXInvertMatrix +.XS + PEXInvertMatrix +.XE +.IN "PEXInvertMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXInvertMatrix\^(\^PEXMatrix \fItransform\fP, PEXMatrix \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to invert +.IP \fItransform_return\fP 1i +The inverse transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; non-zero if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function computes the inverse of a transformation matrix. +.LP +An unsuccessful status is returned if the matrix is non-invertible. +.LP +The two arguments may be the same variable, in which case the inversion is +performed in-place, overwriting the original transform. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXInvertMatrix2D +.RE +.bp +.SH +PEXInvertMatrix2D +.XS + PEXInvertMatrix2D +.XE +.IN "PEXInvertMatrix2D" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXInvertMatrix2D\^(\^PEXMatrix3x3 \fItransform\fP, PEXMatrix3x3 \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform\fP 1i +The transformation matrix to invert +.IP \fItransform_return\fP 1i +The inverse transformation +.RE +.SH +Returns +.RS +.LP +Zero if successful; non-zero if unsuccessful. +.RE +.SH +Description +.RS +.LP +This function computes the inverse of a 2D transformation +matrix. +.LP +An unsuccessful status is returned if the matrix is non-invertible. +.LP +The two arguments may be the same variable, in which case the inversion is +performed in-place, overwriting the original transform. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.LP +.PN PEXInvertMatrix +.RE +.bp +.SH +PEXIdentityMatrix +.XS + PEXIdentityMatrix +.XE +.IN "PEXIdentityMatrix" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +void PEXIdentityMatrix\^(\^PEXMatrix \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform_return\fP 1i +The returned identity matrix +.RE +.SH +Description +.RS +.LP +This function returns an identity matrix. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXIdentityMatrix2D +.XS + PEXIdentityMatrix2D +.XE +.IN "PEXIdentityMatrix2D +.SH +Synopsis +.RS +.FD 0 +void PEXIdentityMatrix2D\^(\^PEXMatrix3x3 \fItransform_return\fP\^) +.FN +.RE +.SH +Arguments +.RS +.IP \fItransform_return\fP 1i +The returned identity matrix +.RE +.SH +Description +.RS +.LP +This function returns a 2D identity matrix. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.NH 2 +Utilities for Computing Geometric Normals +.XS +\*(SN Utilities for Computing Geometric Normals +.XE +.IN "utilities" "computing geometric normals" +.LP +These utilities compute the geometric normal vectors of the +complex PEX output primitives. Their input parameters are +identical to the parameters of the corresponding output command +function. The facet-data return parameter is filled in with +the computed geometric normal of each facet. +.ID +.PN PEXGeoNormFillArea +.PN PEXGeoNormFillAreaSet +.PN PEXGeoNormQuadrilateralMesh +.PN PEXGeoNormSetOfFillAreaSets +.PN PEXGeoNormTriangleStrip +.DE +.NH 3 +Common Data Structures +.XS +\*(SN Common Data Structures +.XE +.LP +Below are the data structures used that are common to more than one function +described in this section. +.RS +.Co +/* coordinates */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXCoord; +.sp +typedef struct { + float x; + float y; +} PEXCoord2D; +.sp +typedef struct { + unsigned long count; /* number of points */ + PEXCoord *points; +} PEXListOfCoord; /* Pointer to an array of 3D points */ +.sp +typedef struct { + unsigned long count; /* number of points */ + PEXCoord2D *points; +} PEXListOfCoord2D; /* Pointer to an array of 2D points */ +.DE +/* vectors */ +.ID +typedef struct { + float x; + float y; + float z; +} PEXVector; +.DE +/* facet data */ +.ID +typedef union { + PEXColorIndexed index; + PEXColorRGB rgb; + PEXColorHSV hsv; + PEXColorHLS hls; + PEXColorCIE cie; + PEXColorRGB8 rgb8; + PEXColorRGB16 rgb16; + PEXVector normal; + PEXColorIndexedNormal index_normal; + PEXColorRGBNormal rgb_normal; + PEXColorHSVNormal hsv_normal; + PEXColorHLSNormal hls_normal; + PEXColorCIENormal cie_normal; + PEXColorRGB8Normal rgb8_normal; + PEXColorRGB16Normal rgb16_normal; +} PEXFacetData; +.sp +typedef union { + PEXColorIndexed *index; + PEXColorRGB *rgb; + PEXColorHSV *hsv; + PEXColorHLS *hls; + PEXColorCIE *cie; + PEXColorRGB8 *rgb8; + PEXColorRGB16 *rgb16; + PEXVector *normal; + PEXColorIndexedNormal *index_normal; + PEXColorRGBNormal *rgb_normal; + PEXColorCIENormal *cie_normal; + PEXColorHSVNormal *hsv_normal; + PEXColorHLSNormal *hls_normal; + PEXColorRGB8Normal *rgb8_normal; + PEXColorRGB16Normal *rgb16_normal; +} PEXArrayOfFacetData; +.sp +typedef struct { + PEXTableIndex index; + unsigned short reserved; +} PEXColorIndexed; +.sp +typedef struct { + float red; + float green; + float blue; +} PEXColorRGB; +.sp +typedef struct { + float hue; + float saturation; + float value; +} PEXColorHSV; +.sp +typedef struct { + float hue; + float lightness; + float saturation; +} PEXColorHLS; +.sp +typedef struct { + float x; + float y; + float z; +} PEXColorCIE; +.sp +typedef struct { + unsigned char red; + unsigned char green; + unsigned char blue; + unsigned char reserved; +} PEXColorRGB8; +.sp +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short reserved; +} PEXColorRGB16; +.sp +typedef struct { + PEXColorIndexed index; + PEXVector normal; +} PEXColorIndexedNormal; +.sp +typedef struct { + PEXColorRGB rgb; + PEXVector normal; +} PEXColorRGBNormal; +.sp +typedef struct { + PEXColorCIE cie; + PEXVector normal; +} PEXColorCIENormal; +.sp +typedef struct { + PEXColorHSV hsv; + PEXVector normal; +} PEXColorHSVNormal; +.sp +typedef struct { + PEXColorHLS hls; + PEXVector normal; +} PEXColorHLSNormal; +.sp +typedef struct { + PEXColorRGB8 rgb8; + PEXVector normal; +} PEXColorRGB8Normal; +.sp +typedef struct { + PEXColorRGB16 rgb16; + PEXVector normal; +} PEXColorRGB16Normal; +.DE +/* vertex data */ +.ID +typedef struct { + unsigned long count; /* number of vertices */ + PEXArrayOfVertex vertices; /* pointer to vertices */ +} PEXListOfVertex; +.sp +typedef union { + PEXCoord *no_data; + PEXVertexIndexed *index; + PEXVertexRGB *rgb; + PEXVertexHSV *hsv; + PEXVertexHLS *hls; + PEXVertexCIE *cie; + PEXVertexRGB8 *rgb8; + PEXVertexRGB16 *rgb16; + PEXVertexNormal *normal; + PEXVertexEdge *edge; + PEXVertexIndexedNormal *index_normal; + PEXVertexRGBNormal *rgb_normal; + PEXVertexHSVNormal *hsv_normal; + PEXVertexHLSNormal *hls_normal; + PEXVertexCIENormal *cie_normal; + PEXVertexRGB8Normal *rgb8_normal; + PEXVertexRGB16Normal *rgb16_normal; + PEXVertexIndexedEdge *index_edge; + PEXVertexRGBEdge *rgb_edge; + PEXVertexHSVEdge *hsv_edge; + PEXVertexHLSEdge *hls_edge; + PEXVertexCIEEdge *cie_edge; + PEXVertexRGB8Edge *rgb8_edge; + PEXVertexRGB16Edge *rgb16_edge; + PEXVertexNormalEdge *normal_edge; + PEXVertexIndexedNormalEdge *index_normal_edge; + PEXVertexRGBNormalEdge *rgb_normal_edge; + PEXVertexHSVNormalEdge *hsv_normal_edge; + PEXVertexHLSNormalEdge *hls_normal_edge; + PEXVertexCIENormalEdge *cie_normal_edge; + PEXVertexRGB8NormalEdge *rgb8_normal_edge; + PEXVertexRGB16NormalEdge *rgb16_normal_edge; +} PEXArrayOfVertex; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; +} PEXVertexIndexed; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; +} PEXVertexRGB; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; +} PEXVertexHSV; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; +} PEXVertexHLS; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; +} PEXVertexCIE; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; +} PEXVertexRGB8; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; +} PEXVertexRGB16; +.sp +typedef struct { + PEXCoord point; + PEXVector normal; +} PEXVertexNormal; +.sp +typedef struct { + PEXCoord point; + unsigned int edge; +} PEXVertexEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + PEXVector normal; +} PEXVertexIndexedNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + PEXVector normal; +} PEXVertexRGBNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + PEXVector normal; +} PEXVertexHSVNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + PEXVector normal; +} PEXVertexHLSNormal; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + PEXVector normal; +} PEXVertexCIENormal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + PEXVector normal; +} PEXVertexRGB8Normal; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + PEXVector normal; +} PEXVertexRGB16Normal; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + unsigned int edge; +} PEXVertexIndexedEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + unsigned int edge; +} PEXVertexRGBEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + unsigned int edge; +} PEXVertexHSVEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + unsigned int edge; +} PEXVertexHLSEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + unsigned int edge; +} PEXVertexCIEEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + unsigned int edge; +} PEXVertexRGB8Edge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + unsigned int edge; +} PEXVertexRGB16Edge; +.sp +typedef struct { + PEXCoord point; + PEXVector normal; + unsigned int edge; +} PEXVertexNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorIndexed index; + PEXVector normal; + unsigned int edge; +} PEXVertexIndexedNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB rgb; + PEXVector normal; + unsigned int edge; +} PEXVertexRGBNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHSV hsv; + PEXVector normal; + unsigned int edge; +} PEXVertexHSVNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorHLS hls; + PEXVector normal; + unsigned int edge; +} PEXVertexHLSNormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorCIE cie; + PEXVector normal; + unsigned int edge; +} PEXVertexCIENormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB8 rgb8; + PEXVector normal; + unsigned int edge; +} PEXVertexRGB8NormalEdge; +.sp +typedef struct { + PEXCoord point; + PEXColorRGB16 rgb16; + PEXVector normal; + unsigned int edge; +} PEXVertexRGB16NormalEdge; +.ft P +.DE +.RE +.bp +.XS +Function Descriptions +.XE +.SH +PEXGeoNormFillArea +.XS + PEXGeoNormFillArea +.XE +.IN "PEXGeoNormFillArea" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGeoNormFillArea\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, PEXFacetData *\fIfacet_data\fP, unsigned int \fIcount\fP, PEXArrayOfVertex \fIvertices\fP) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided. It should contain the bit +.PN PEXGANormal . +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided. +.IP \fIcolor_type\fP 1i +The type of color data provided. +.IP \fIfacet_data\fP 1i +A pointer to facet data. This function adds the geometric normal to this data. +.IP \fIcount\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices defining the fill area. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +.fi +\fBPEXBadPrimitive\fP - A normal cannot be computed because the fill area is degenerate or because all vertices are colinear. +.DE +.RE +.SH +Description +.RS +.LP +This function computes the geometric normal of a fill area +and stores it in the specified facet data. +.LP +The normal is computed by finding the first three non-colinear +points in the specified vertices, forming two vectors from those points, +one from the first point to the second point and one from the +first point to the third point, and computing the cross product +of those two vectors. The geometric normal is the normalized +cross product. +.LP +The three points, A, B, and C are selected as follows. Point A is the first +point in the list of vertices. Point B is the next point in the +list that is not coincident with A. Point C is the next point in the +list that is not colinear with A and B. If it is not possible to find three +such points, the functions returns unsuccessfully. +.LP +If the facet attributes does not contain the bit +.PN PEXGANormal , +the geometric normal is not computed. However, the function still returns +successfully. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGeoNormFillAreaSet +.XS + PEXGeoNormFillAreaSet +.XE +.IN "PEXGeoNormFillAreaSet" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGeoNormFillAreaSet\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, unsigned int \fIcount\fP, PEXFacetData *\fIfacet_data\fP, PEXListOfVertex *\fIvertex_lists\fP) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided. It should contain the bit +.PN PEXGANormal . +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided. +.IP \fIcolor_type\fP 1i +The type of color data provided. +.IP \fIcount\fP 1i +The number of fill areas in the set. +.IP \fIfacet_data\fP 1i +An array of facet data. This function adds the geometric normal to this data. +.IP \fIvertex_lists\fP 1i +A pointer to the list of vertex arrays defining each contour of the fill area set. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +.fi +\fBPEXBadPrimitive\fI - A normal cannot be computed because all fill areas in the set are degenerate or because the vertices of all the fill areas are colinear. +.DE +.RE +.SH +Description +.RS +.LP +This function computes the geometric normal of a fill area +set and stores it in the specified facet data. +.LP +The normal is computed by finding the first three non-colinear +points in a fill area of the set, beginning with the first +fill area and searching until three such points are found in +a single fill area. Two vectors are formed from these points: +one vector from the first point to the second point, and one +vector from the first point to the third point. The geometric +normal returned is the normalized cross product of those two +vectors. +.LP +The three points, A, B, and C are selected as follows. Point A is the first +point in the first list of vertices. Point B is the next point in that same +list that is not coincident with A. Point C is the next point in that same +list that is not colinear with A and B. If it is not possible to find three +such points in the first list, then the rest of the lists are searched in +order to select three appropriate points from a single list. If it is still +not possible to find three such points in any list, the functions returns +unsuccessfully. +.LP +If the facet attributes does not contain the bit +.PN PEXGANormal , +the geometric normal is not computed. However, the function still returns +successfully. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGeoNormQuadrilateralMesh +.XS + PEXGeoNormQuadrilateralMesh +.XE +.IN "PEXGeoNormQuadrilateralMesh" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGeoNormQuadrilateralMesh\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, PEXArrayOfFacetData \fIfacet_data\fP, unsigned int \fIcol_count\fP, unsigned int \fIrow_count\fP, PEXArrayOfVertex \fIvertices\fP) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided. It should contain the bit +.PN PEXGANormal . +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided. +.IP \fIcolor_type\fP 1i +The type of color data provided. +.IP \fIfacet_data\fP 1i +An array of facet data. This function adds the geometric normals to this data. +.IP \fIcol_count\fP 1i +The number of columns in the vertex array. +.IP \fIrow_count\fP 1i +The number of rows in the vertex array. +.IP \fIvertices\fP 1i +A two-dimensional (row-major) array of vertices defining the quadrilateral mesh. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +.fi +\fBPEXBadPrimitive\fI - A normal cannot be computed for one or more quadrilaterals in the mesh. +.DE +.RE +.SH +Description +.RS +.LP +This function computes the geometric normals of a quadrilateral +mesh and stores them in the specified facet data. +.LP +The geometric normal of each quadrilateral is computed by +forming two vectors from two of its sides, and computing the +cross product of those two vectors. The geometric normal is +the normalized cross product: +.ID +Ng = (V1 x V2) / |V1 X V2| +.DE +Given the quadrilateral composed of four vertices, Pi,j, +where i indicates the row of the point and j its column, +the first vector, V1, is from Pi,j to Pi+1,j+1. The +second vector, V2, is from Pi+1,j to Pi,j+1. +.LP +If the facet attributes does not contain the bit +.PN PEXGANormal , +the geometric normal is not computed. However, the function still returns +successfully. +.LP +A geometric normal is computed for all quadrilaterals where +it is possible to compute one, even if a normal cannot be +computed for some other quadrilaterals. An error is returned +if a normal cannot be computed for one or more of the +quadrilaterals in the mesh. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGeoNormSetOfFillAreaSets +.XS + PEXGeoNormSetOfFillAreaSets +.XE +.IN "PEXGeoNormSetOfFillAreaSets +.SH +Synopsis +.RS +.FD 0 +int PEXGeoNormSetOfFillAreaSets\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, unsigned int \fIset_count\fP, PEXArrayOfFacetData \fIfacet_data\fP, unsigned int \fIvertex_count\fP, PEXArrayOfVertex \fIvertices\fP, unsigned int \fIindex_count\fP, PEXConnectivityData *\fIconnectivity\fP) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided. It should contain the bit +.PN PEXGANormal . +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided. +.IP \fIcolor_type\fP 1i +The type of color data provided. +.IP \fIset_count\fP 1i +The number of fill area sets. +.IP \fIfacet_data\fP 1i +An array of facet data. This function adds the geometric normals to this data. +.IP \fIvertex_count\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices. +.IP \fIindex_count\fP 1i +The number of vertex connectivity indices. +.IP \fIconnectivity\fP 1i +A pointer to the list of contour connectivity data. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +.fi +\fBPEXBadPrimitive\fP - A normal cannot be computed for a fill area set because all its fill areas are degenerate or because all the vertices of all fill areas in the set are colinear. +.DE +.RE +.SH +Description +.RS +.LP +This function computes the geometric normals of set of fill +area sets primitive and stores them in the specified facet data. +.LP +The normals are computed by finding the first three non-colinear +points in each fill area set, beginning with the first fill +area of each set and searching until three such points are found +in a single fill area. Two vectors are formed from these +points: one vector from the first point to the second point, and +one vector from the first point to the third point. The +geometric normal returned is the normalized cross product of +these two vectors. +.LP +The three points for each fill area set are selected as described +for +.PN PEXGeoNormFillAreaSet . +.LP +If the facet attributes does not contain the bit +.PN PEXGANormal , +the geometric normal is not computed. However, the function still returns +successfully. +.LP +A geometric normal is computed for all fill area sets where +it is possible to compute one, even if a normal cannot be +computed for some other fill area sets. The function returns unsuccessfully +if a normal cannot be computed for one or more of the fill area sets. +.RE +.SH +Data Structures +.ID +.Co +typedef struct { + unsigned short count; /* number of lists */ + PEXListOfUShort *lists; +} PEXConnectivityData; +.sp +typedef struct { + unsigned short count; /* number of shorts */ + unsigned short *shorts; +} PEXListOfUShort; +.sp +See also the \fICommon Data Structures\f section. +.ft P +.DE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.SH +PEXGeoNormTriangleStrip +.XS + PEXGeoNormTriangleStrip +.XE +.IN "PEXGeoNormTriangleStrip" "" "@DEF@" +.SH +Synopsis +.RS +.FD 0 +int PEXGeoNormTriangleStrip\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, PEXArrayOfFacetData \fIfacet_data\fP, unsigned int \fIcount\fP, PEXArrayOfVertex \fIvertices\fP) +.FN +.RE +.SH +Arguments +.RS +.IP \fIfacet_attributes\fP 1i +A mask indicating the facet attributes provided. It should contain the bit +.PN PEXGANormal . +.IP \fIvertex_attributes\fP 1i +A mask indicating the vertex attributes provided. +.IP \fIcolor_type\fP 1i +The type of color data provided. +.IP \fIfacet_data\fP 1i +An array of facet data. This function adds the geometric normals to this data. +.IP \fIcount\fP 1i +The number of vertices. +.IP \fIvertices\fP 1i +An array of vertices defining the triangle strip. +.RE +.SH +Returns +.RS +.LP +Zero if successful; otherwise, one of the following: +.ID +.fi +\fBPEXBadPrimitive\fI - A normal cannot be computed for one or more triangles in the strip. +.DE +.RE +.SH +Description +.RS +.LP +This function computes the geometric normals of a triangle +strip and stores them in the specified facet data. +.LP +The geometric normal of each triangle is computed by forming +two vectors from two of its sides, and computing the cross +product of those two vectors. The geometric normal is the +normalized cross product: +.ID +Ng = (V1 x V2) / |V1 X V2| +.DE +For the first, third, and subsequent odd-numbered triangles, +the first vector (V1) is from the first point (Pi) of the +triangle to the second point (Pi+1), and the second vector +(V2) is from the first point of the triangle to the third point +(Pi+2). For the second, fourth, and subsequent even-numbered +triangles, the first vector is from the first point (Pi) of the +triangle to the third point (Pi+2), and the second vector is +from the first point of the triangle to the second point (Pi+1). +.LP +If the facet attributes does not contain the bit +.PN PEXGANormal , +the geometric normal is not computed. However, the function still returns +successfully. +.LP +A geometric normal is computed for all triangles where +it is possible to compute one, even if a normal cannot be +computed for some other triangles. An error is returned +if a normal cannot be computed for one or more of the +triangles in the strip. +.RE +.SH +Errors +.RS +.LP +None +.RE +.SH +See Also +.RS +.RE +.bp +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/cover b/xc/doc/specs/PEX5/PEXlib/cover new file mode 100644 index 000000000..564fdba9c --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/cover @@ -0,0 +1,66 @@ +.TL +.LG +.LG +.LG +PEXlib Specification and C Language Binding +.NL +.sp 1i +.AU +.LG +Jeff Stevenson +.NL +.sp 0.05i +Chief Architect and Document Editor +.AI +Hewlett-Packard Company +.AE +.sp 1i +.LP +.ce 5 +Version 5.1 +.sp 0.5i +November 5, 1992 +.ce +.bp +\ +.sp 4.5i +.LP +.SM +.ce 10 +Copyright 1988, 1989, 1990, 1991 by Digital Equipment Corporation, Maynard, Massachusetts. +.sp 0.1i +Copyright \s+2\(co\s-2 Hewlett-Packard Company, 1992, Fort Collins, Colorado +.sp 0.25i +All Rights Reserved +.ce +.sp 0.25i +.LP +.SM +Permission to use, copy, modify, and distribute this documentation +for any purpose and without fee is hereby granted, +provided that the above copyright notices appear in all copies and that +both the copyright notices and this permission notice appear in +supporting documentation, and that the names of Digital or +Hewlett-Packard not be used in advertising or publicity pertaining to +distribution of the documentation without specific, written prior permission. +.sp 0.25i +.LP +.SM +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS DOCUMENTATION, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL 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 +DOCUMENTATION. +.sp 0.25i +.LP +.SM +HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS +DOCUMENTATION, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard +shall not be liable for errors contained herein or direct, indirect, +special, incidental or consequential damages in connection with the +furnishing, performance or use of this documentation. +.NL +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/credits b/xc/doc/specs/PEX5/PEXlib/credits new file mode 100644 index 000000000..a1c37b5f0 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/credits @@ -0,0 +1,49 @@ +\& +.sp 1 +.ce 1 +\s+1\fBAcknowledgements\fP\s-1 +.sp 2 +.nr H1 0 +.nr H2 0 +.nr H3 0 +.nr H4 0 +.nr H5 0 +.na +.LP +.LP +On behalf of the MIT X Consortium, we gratefully acknowledge and give thanks +to the many who have participated in the design, definition and implementation +of PEXlib. +.sp +To Digital Equipment Corporation and Sony Microsystems, Inc., we give thanks +for their generous donation of prototypical implementations to the MIT X +Consortium for use in this effort. And to SHOGraphics and International +Business Machines, thanks for donation of additional implementation effort. +And last, but certainly not least, to Ralph Mor (X Consortium), thanks for +completing the PEXlib sample implementation. +.sp +Also to Digital Equipment Corporation, thanks for their contribution of +initial documentation which was leveraged in producing this document. +.sp +Thanks to Tom Gaskins (Sound Software Design) and +Jan Hardenbergh (Oki Advanced Products Division) for their work in defining the utilities in +\fIChapter 16\fP. +.sp +Thanks to the many who provided timely review of document drafts, including Tom +Gaskins (Sound Software Design), Ralph Mor (X Consortium), +Bob Scheifler (Director of the X Consortium), John Waitz (Hewlett-Packard Co.) +and many others. +.sp +Finally, we acknowledge the contribution of those involved in the design +and definition of the PEX protocol, without which, PEXlib would not exist. +.bp +\ +'\" +'\" Initialize page number and headers for PEXlib document +'\" +.nr % 0 +.EH '''' +.OH '''' +.EF ''- % -'' +.OF ''- % -'' +.bp diff --git a/xc/doc/specs/PEX5/PEXlib/libndxmac.t b/xc/doc/specs/PEX5/PEXlib/libndxmac.t new file mode 100644 index 000000000..337849705 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/libndxmac.t @@ -0,0 +1,47 @@ +'\".eh '\fBPEXlib \- C Library\fP''\fBPEX, Version 5.1\fP' +'\".oh '\fBPEXlib \- C Library\fP''\fBPEX, Version 5.1\fP' +.eh '''' +.oh '''' +.so index.pageno +. \" Macros for the index +.de Ib \" blank major entry +.br +.ne 2v +\\$1: +.. +.de I> \" major entry +.br +\\$1, \\$2 +.. +.de I< \" minor entry +.br + \\$2, \\$3 +.. +.de LB \" new letter starts here +.di DT \" start diverted text +.sp +.sz +2 +.b +\\$1 +.r +.sz -2 +.sp +.di \" end diverted text +.ne \\n(dnu+1v \" get enough space for it +.DT \" output it +.. +.\" set up various parameters for the right evironment. +.\" Your taste may be different. +.ef ''- % -'' +.of ''- % -'' +.++ A +.po 1.0i \" physical offset +.ta 5iR \" right alignment tab +.lp \" initialize -me +.ce +.sz 18 +Index +.sp 1 +.sz 10 +.2c \" 2 column mode +.sp 3 diff --git a/xc/doc/specs/PEX5/PEXlib/pexlibmac.t b/xc/doc/specs/PEX5/PEXlib/pexlibmac.t new file mode 100644 index 000000000..7ad36ecac --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/pexlibmac.t @@ -0,0 +1,106 @@ +.na +.de Ds +.nf +.\\$1D \\$2 \\$1 +.ft 1 +.ps \\n(PS +.if \\n(VS>=40 .vs \\n(VSu +.if \\n(VS<=39 .vs \\n(VSp +.. +.de De +.ce 0 +.if \\n(BD .DF +.nr BD 0 +.in \\n(OIu +.if \\n(TM .ls 2 +.sp \\n(DDu +.fi +.. +.de FD +.LP +.KS +.TA .5i 3i +.ta .5i 3i +.in +.5i +.ti -.5i +.. +.de FN +.in -.5i +.KE +.LP +.. +.de IN \" send an index entry to the stderr +.tm \\n%:\\$1:\\$2:\\$3 +.. +.de C{ +.KS +.nf +.D +.\" +.\" choose appropriate monospace font +.\" the imagen conditional, 480, +.\" may be changed to L if LB is too +.\" heavy for your eyes... +.\" +.ie "\\*(.T"480" .ft L +.el .ie "\\*(.T"300" .ft L +.el .ie "\\*(.T"202" .ft PO +.el .ie "\\*(.T"aps" .ft CW +.el .ft R +.ps \\n(PS +.ie \\n(VS>40 .vs \\n(VSu +.el .vs \\n(VSp +.. +.de C} +.DE +.R +.. +.de Pn +.IN \\$2 +.ie t \\$1\fB\^\\$2\^\fR\\$3 +.el \\$1\fI\^\\$2\^\fP\\$3 +.. +.de PN +.IN \\$1 +.ie t \fB\^\\$1\^\fR\\$2 +.el \fI\^\\$1\^\fP\\$2 +.. +.de NT +.ne 7 +.ds NO Note +.if \\n(.$ .ds NO \\$1 +.ie n .sp +.el .sp 10p +.TB +.ce +\\*(NO +.ie n .sp +.el .sp 5p +.if '\\$1'C' .ce 99 +.if '\\$2'C' .ce 99 +.in +5n +.ll -5n +.R +.. +. \" Note End -- doug kraft 3/85 +.de NE +.ce 0 +.in -5n +.ll +5n +.ie n .sp +.el .sp 10p +.. +. \" Courier Font for code excerpts -- Bob Scheifler 11/92 +.de Co +.ie \nC .ft \nC +.el .ft C +.. +.ny0 +'\" +'\" Initialize font and headers for PEXlib document +'\" +.ft 1 +.EH '''' +.OH '''' +.EF '''' +.OF '''' diff --git a/xc/doc/specs/PEX5/PEXlib/postproc b/xc/doc/specs/PEX5/PEXlib/postproc new file mode 100644 index 000000000..e06f96ac2 --- /dev/null +++ b/xc/doc/specs/PEX5/PEXlib/postproc @@ -0,0 +1,15 @@ +.ft 1 +.EH '''' +.OH '''' +.EF '''' +.OF '''' +.bp +\& +.XS +Index +.XE +.EQ +delim $$ +.EN +.tm .pn \n% +.PX |