Information technology — Computer graphics — Graphical Kernel System for Three Dimensions (GKS-3D) language bindings — Part 4: C

Specifies a language independent nucleus of a graphics system. Specifies also a language dependent layer for the C language. Annexes A, B, C, D, E and F are for information only.

Technologies de l'information — Infographie — Interfaces de langages pour GKS (Graphical Kernel System) pour trois dimensions — Partie 4: C

General Information

Status
Published
Publication Date
17-Dec-1991
Current Stage
9093 - International Standard confirmed
Start Date
05-Apr-2022
Completion Date
30-Oct-2025
Ref Project
Standard
ISO/IEC 8806-4:1991 - Information technology -- Computer graphics -- Graphical Kernel System for Three Dimensions (GKS-3D) language bindings
English language
264 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


ISOIIEC
INTERNATICNAL
STANDARD 8806-4
First edition
1991-12-15
-.-.------_
-. -----
Information technology - Computer graphics -
Graphical Kerne1 System for Three Dimensions
(GKS-3D) language bindings A
Part 4:
c
Technologies de I’information -. Infographie - Interfaces de langages
pour GKS (Graphical Kerne1 System) pow trois dimensions -
Partie 4: C
--
----
---pmwrz .__._.___-.-__ -.-.,----,----.
-- --
- --- .--
--
-- ---
---
-- _-
- Z
= =
-
=
=
= 5
Z
Z -1 i
=
5 =
=
E =
Reference number
= =
C C
-- --
--
- ---- ----- _
---- --.- - ---. - ---------- - .____ ISO/1 EC 8806-4: 199 1 (E)
___ ____ -_ -_-_ --_- 4fzf- -.-.-. --.

ISO/IEC8806=4:199l(E)
Contents
scope .
2 Normative references .
. . . . . . . . . . . . . .t.
3 The C Language Binding of GKS-3D
3.1 Conformance .
.............................................................................................................
3.2 Functions versus Macros
3.3 Character Strings .
3.4 Function Identifiers .
3.5 Registration .
3.6 Identifiers for Graphical Items .
3.7 Return Values .
3.8 Header Files .
3.9 Memory Management .
3.9.1 Functions which Return Simple Lists .
........................................................ 5
3.9.2 Functions which Return Complex Data Structures
Error Handling .
3.10
3.10.1 Application Supplied Error Handlers .
......................................................................................................................
3.10.2 Error Codes
...............................................................................................
3.10.3 C-specific GKS-3D errors
3.11 Colour Representations .
.......................................................................................... 8
3.12 Storage of Multi-dimensional Arrays
3.12.1 Storage of 2*3 Matrices .
3.12.2 Storage of 3*4 Matrices .
3.12.3 Storage of 4*4 Matrices .
3.12.4 Storage of Colour Arrays .
Tables .
...................................................................... 9
4.1 Abbreviation Policy in Construction of Identifiers
4.2 Table of Abbreviations Used .
4.3 Function Names .
...............................................................
4.3.1 List Ordered Alphabetically by Bound Name
...........................................................
4.3.2 List Ordered Alphabetically by GKS-3D Name
..........................................
4.3.3 List Ordered Alphabetically by Bound Name within Level
....................................................................................................................................
Type Definitions
................................................................................................ 33 d
5.1 Mapping of GKS-3D data types
................................................................................................ 32
5.2 Environmental Type Definitions
........................................................................... 33
5.3 Implementation Dependent Type Definitions
......................................................................... 44
5.4 Implementation Independent Type Definitions
Macro Definitions .
6.1 Function identifiers .
6.2 Error Codes .
6.3 Miscellaneous Macros .
6.3.1 Linetypes .
6.3.2 Marker Types .
...............................................................................................................
6.3.3 Colour Models
.................................................................................................
6.3.4 Prompt and Echo Types
................................................................................ 76
6.3.5 Default Parameters of OPEN GKS
7 C GKS-3D Function Interface .
7.1 Notational Conventions .
7.2 Control Functions .
7.3 Output Functions .
0 ISO/IEC 1991
All rights reserved. No part of this publication may be reproduced or utilized in any form or by
any means, electronie or mechanical, including photocopying and microfilm, without Permission
in writing from the publisher.
ISO/IEC Copyright Office l Case postale 56 l CH-121 1 Geneve 20 l Switzerland
Printed in Switzerland
ISO/IEC8806-4:1991(E)
7.4 Output Attribute Functions
........................................................................................................ 81
7.4.1 Workstation Independent Primitive Attributes
.............................................................. 81
7.4.2 Workstation Attributes . 85
7.5 Transformation Functions
.......................................................................................................... 87
7.5.1 Normalization Transformation . 87
7.5.2 View transformation functions . 88
7.5.3 HLHSR functions . 88
7.5.4 Workstation transformation . 89
7.6 Segment Functions . 89
7.6.1 Segment Manipulation Functions . 89
......................................................................................... 91
7.6.2 Segment Attribute Functions
.......................................................................................................................... 92
7.7 Input Functions
...................................................................... 92
7.7.1 Initialization of Input Devices Functions
............................................................... 95
7.7.2 Setting the Mode of Input Devices Functions
................................................................................................
7.7.3 Request Input Functions 96
7.7.4 Sample Input Functions . 98
7.7.5 Event Input Functions . 100
7.8 MetafYile Functions . 102
7.9 Inquiry Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.9.1 Inquiry Functions for Operating State Value . 102
7.9.2 Inquiry Functions for GKS-3D Description Table . 103
Inquiry Functions for GKS-3D State List . 103
7.9.3
.............................................................. 112
7.9.4 Inquiry Functions for Workstation State List
................................................ 124
7.9.5 Inquiry Functions for Workstation Description Table
............................................................... 135
7.9.6 Inquire functions for the Segment State List
7.9.7 Pixel Inquiries .
7.9.8 Inquiry Functions for Error State List .
7.10 Utilitj Functions . 137
7.10.1 Utility Functions in GKS-3D . 137
7.10.2 Binding Specific Utilities . 138
7.11 Error Handling . . . . . . . . . . . . . . . t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
A Compiled GKS-3D/C Specifkation . 141
B Sample Programs . 204
B.l STAR Program . 204
B.2 IRON Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*.- 906
B.3 MAP Program . 213
B.4 MANIPULATE Program . 215
B.5 SHOW LINE Program . 221
B.6 DODECA Program . 226
C Metafile Items . 231
D Short Function Identifiers . 233
E Memory Management .
E.l 240
Introduction .
E.2 . 240
Functions That Return Simple Lists
E.2.1 Operationof ginq_list line inds .
E.3 Functions That Return Structured Data . -
E.3.1 Operation of gcreate store .
E.3.2 Operationof ginestroke st and ginq_pat rep . 246
-
E.3.3 Operation of gdel store . - 250
-
F Function Lists . 253
F.1 . 253
Alphabetic by GKS-3D Name
F.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Alphabetic by Binding Name
. . .
Ill
ISO/IEC 8806-4 : 1991(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Com-
mission) together form a System for worldwide standardization as a whole. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical com-
mittees established by the respective organization to deal with the fields of technical activity. ISO and IEC
technical committees colIaborate in fields of mutual interest. Other international organizations, govem-
mental and non-govemmental, in liaison with ISO and IEC, also take part in the werk.
In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC
JTCl. Draft International Standards adopted by the joint technical committee are circulated to national
bodies for voting. Publication as an International Standard requires approval by at least 75 % of the
national bodies casting a vote.
International Standard ISO/IEC 8806-4 was prepared by Joint Technical Committee ISO/IEC JTCl, 1@or-
mation technology.
ISO/IEC 8806 consists of the following parts, under the general title
Information technology - Computer graphics - Graphical Kernel System for Three Dimensions (GKS3D)
language bindings -
Part 1: FORTAN
Part 2: PASCAL
Part 3: ADA
Part4: C
Annexes A to F of this part of ISO/IEC 8806 are for information orily.
iv
ISO/IEC 8806-4 : 1991(E)
Introduction
The Graphical Kerne1 System for Three Dimensions (GKS3D) functional description is registered as ISO
8805 : 1988. As explained in the Scope and Field of Application of ISO 8805, that International Standard
is specified in a language independent manner and needs to be embedded in language depcndent layers
(language bindings) for use with particular programming languages.
The purpose of this part of ISO/IEC 8806 is to define a Standard binding for the C Computer programming
language.
Some functions in ISO 8805 also appear in the Graphical Kerne1 System (GM) functional description
(ISO 7942). The binding of those functions in this part of ISO/IEC 8806 is the same as in ISO/IEC 8651-4,
the C language binding of GKS.

This page intentionally left blank

INTERNATIONAL STANDARD ISOAEC 8806=4:1991(E)
Information technology - Computer graphics -
Graphical Kerne1 System for Three Dimensions
(GKS-3D) language bindings -
Part 4:
C
1 Scope
The Graphical Kerne1 System for Three Dimensions (GKS-3D), ISO 8805 : 1988 , specifies a language
independent nucleus of a graphics System. For integration into a programming language, GKS-3D is
embedded in a language dependent layer obeying the particular conventions of that language. This part of
ISO/IEC 8806 specifies such a language dependent layer for the C language.
ISO/IEC 8806-4 : 199l(E) GKS=3D/C
2 Normative references
The following Standards contain provisions which, through reference in this text, constitute Provision of
this part of ISO/IEC 8806. At the time of publication, the editions indicated were valid. All Standards are
subject to revisions, and Parties to agreements based on this part of lSO/IEC 8806 are encouraged to inves-
tigate the possibility of applying the most recent editions of the Standards indicated below. Members of
IEC and ISO maintain registers of currently valid International Standards.
- Graphical Kerne1 System (GKS)
ISO 794211985, Information processing systems - Computer graphics
functional description.
- Graphical Kerne1 System (GKS)
ISO/IEC 8651-4:1991, Information technology - Computer graphics
language bindings - Part 4 : C.
ISO 880511988, Information processing Systems - Computer graphics - Graphical Kerne1 System for
Three Dimensions (GKS-3D) functional description.
ISO/IEC 8806- 1: 1991, Information processing systems - Computer graphics - Graphical Kerne1 Svstem
e
for three dimensions (GKS-3D) - language bindings - Part 1 : FORTRAN.
ISO/IEC 989911990, Programming languages - C.
ISO/IEC TR 9973: 1988, Information processing - Procedures for registration of graphical items.

GKS=3D/C ISO/IEC 8806-4 : 1991(E)
3 The C Language Binding of GKS-3D
The C language binding of GKS-3D shall be as described in clauses 3,4,5 and 6.
3.1 Conformance
This part of ISO/IEC 8806 incorporates the rules of conformance defined in the GKS-3D Standard (ISO
8805) for GKS-3D implernentations, with those additional requirements specifically def%red for C bindings
in GKS-3D.
The following criteria shall determine conformance of an implementation to this part of ISO/IEC 8806:
In Order to conform, an implementation sf the C binding of GKS-3D shall implement a specific level of
GKS-3D as spectied in ISO 8805. It shall make visible all of the declarations in the C binding spectied
in this part of ISO/IEC 8806 for that same level of GKS-3D and all lower levels and for a specific level
of c.
Thus, for example, the Syntax of the function names shall be precisely as specified in the binding and
Parameters shall be of the data types stated in the binding.
3.2 Functions versus Macros
An implementation may Substitute macros for functions. However, the macros shall be designed so that
side-effects work properly. In general, a macro cannot be used to replace the error handling function
gerr hand. See also 3.10.
-
3.3 Character Strings
The C language represents Character strings ZlSmmy of characters terminated by the null Character (i.e.
. This means that the null Character is not usable as a printable Character.
‘\O’)
3.4 Function Identifiers
The function names of GKS-3D arc all mapped to C functions which begin with the letter g. Wo& and
phrases used in the GKS-3D function names arc often abbreviated in the representation and arc always
separated with the underscore Character WV Y The set of such abbreviations is given in 4.2, and the result-
ing C function names arc listed in 4.3. For example, the abbreviation for the GKS-3D function DELETE
SEGMENT FROM WORKSTATION is gdel seg WS.
del, seg, and WS arc abbreviations for
DELETE, SEGMENT, and WORKSTATION. Se co$inctive FROM is mapped to the null string.
The C Standard (ISO/IEC 9899) requires that Compilers recognize intemal identifiers which arc distinct in
at least 3 1 characters. That Standard also requires that extemal identifiers (i.e. those seen by the linker) be
recognized to a minimum of six characters, independent of case.
Implernentations which run in environments where two distinct C intemal identifiers would be equivalent,
if they were both extemal identifiers, shall include a set of #def ines in the header file which equate the
long names to a set of short names. A possible set of short names for a Compiler that accepts only eight
characters for extemal definitions may be found in annex D.
3.5 Registration
i tems
ISO 8805 reserves certain value ranges for registration’ as graphical items. The registered graphical
will be bound to the C programming language (and other programming languages). The registerec Il item
according to the rules for the designation and Operation of registration
IEC councils have designated the National Institute of Standards and
Yechnology), A-266 Technology Building, Gaithersburg, MD 20899,

ISO/IEC 8806-4 : 199l(E) GKS=3D/C
Registration The C Language Binding of GKS-3D
binding will be consistent with the binding presented in this part of ISO/IEC 8806.
3.6 Identifiers for Graphical Items
Generalized Drawing Primitives and Escape functions arc referenced via identifiers. This part of ISO/IEC
8806 specifies the formst of the identifiers but it does not specify the registration of the identifiers. The
identifiers arc used as arguments to the functions ggdp, ggdp3, and gescape.
An implementation may also represent GDPs and Escapes as separate functions, but this is not required.
There arc two formats for these identifiers. One format is for registered GDPs and Escapes and the other
format is for unregistered GDPs and Escapes.
The format for registered GDP identifiers is:
/* 'nf is the registered GDP id. */
#define GGDP Rn n
( )
#define GGDP? Rn n /* 'nf is the registered GDP3 id. */
( 1
The format for unregistered GDP identifiers is:
#define GGDP Un (-n) /* 'nf is implementation dependent */
#define GGDP? Un (-n) /* 'nf is the registered GDP3 id. */
The format for registered%scape function identifiers is:
#define GESCAPE Rn (n) /* 'nf is the registered Escape id. */
The format for UnregisteredEscape function identifiers is:
(-n) /* 'nf is implementation dependent */
#define GESCAPE Un
-
3.7 Return Values
All GKS-3D/C functions retum void.
3.8 Header Files
C provides a mechanism to allow extemal ties to he included in a compilation. Clause 5 of this part of
ISO/lEC 8806 describes the data types that shall be defined in the file gks . h which should be included in
any application program that intends to use GKS-3D via the C binding.
This part of ISO/IEC 8806 uses the data type size t (as a field in the data type Gdata). The type
-
size t is environment-dependent (e.g. int, long int, unsigned int) and is defined in the file
. Therefore the file gks . h shall also include the file Xstddef . h>.
Additional implementation-dependent items may be placed in this file if needed. These items should Start
with the sentinel “G” or “g”, as far as applicable.
The fle gks . h shal.l also contain extemal declarations for all GKS-3D/C functions because they retum
void. For example, the declaration for the function gopen gks would look like this:
-
extern void *err file, size t mem units);
gopen gks(char
- - - -
3.9 Memory Management
The application shall allocate the memory needed for the data retumed by the implementation. In general,
the application will allocate a C structure and pass a pointer to that structure to an inquiry routine, which
will then place information into the structure. However, a number of inquiry functions retum variable
length data, the length of which is not known a priori by the application.
These functions fall into two classes. One class of functions retums a simple, homogeneous, list of items.
For example, the function INQUIRE SET OF SEGMENT NAMES retums a list of the Segment names in
use. The other class retums complex, heterogeneous data structures. For example, the function INQUIRE
LOCATOR DEVICE STATE retums the device state which includes a locator data record; the data record
tan contain arbitrarily complex implementation-defined data structures. The binding of these two classes
of functions is described in detail below. Subclause 3.10 describes the errors that tan be invoked during
execution of functions which use the memory management policy.
GKS=3D/C ISO/IEC 8806-4 : 199l(E)
The C Language Binding of GKS-3D Memory Management
3.9.1 Functions which Return Simple Lists
Inquiry functions which retum a list of items arc bound such that the application tan inquire about a por-
tion of the list. This list is a subset of the implementation’s intemal list and is called the application’s list.
This alIows the application to process the implementation’s list in a piecewise manner rather than all at
once.
The application allocates the memory for a list and iasses that list to the implementation. The implementa-
P
tion places the results of the inquiry into the list. 1 ‘n Order to support this policy of mem ory management,
three additional Parameters have been added to functions which retum lists:
nun elems appl Xst: An integer input Parameter which is the length of the application’s list.
a)
The yalue of Y&m Zems appl list indicates the number of items (i.e. list elements) which will
fit into the applicat& list. Ä valueof 0 is valid and allows the application to determine the size of the
implementation’s list (which is retumed via num.elems-impl-list) without having the imple-
mentation retum any of the elements of its List.
If nun elems appl list is negative,
GE APPL LIST LENGTH LT ZERO is retumed as the value ofthe erro;indicaGr Parameter.
-
- - - e
Start ind: An integer input Parameter which is an index into the implementation’s list. (Index 0 is
b)
the firstelement of both the implementation’s and application’s list.) Start ind indicates the first
-
item in the implementation’s list that is copied into index 0 of the application’s list. Items arc copied
sequentially fiom the implementation’s list into the application’s list until the application’s list is full or
there arc no more items in the implementation’s list. If Start ind is out of range, error
GE START IND INVAL is retumed as the value of the error indicator&rameter.
-
- -
nun elems impl list: An output Parameter which is a pointer to an integer. The implementation
C)
- - -
stores into this Parameter the number of items that arc in the implementation’s list.
In annex possible underlying mechanism is described.
E, a
3.9.2 Functions which Return Complex Data Structures
The data retumed by the ESCAPE function and the functions which retum input device data records or pat-
tem tables tan be complex in structure. They cannot be represented by a simple list of items. It would be an
onerous task for the application to have to allocate and prepare data structures for these routines. In Order
to facilitate this task of using these inquiry functions, the binding defines a new resource, called a Stare, to
manage the memory for these functions.
The Stare resource is opaque to the application. The application does not know the structure of the Stare or
how it is implemented. The Stare is defined as a void * . This part of ISO/IEC 8806 defines two new
functions which create (in CREATE STORE, bound as
gcreate store) and delete (in DELETE
-
STORE, bound as del store) a Store.
-
A Stare is used by the implementation to manage the memory needed by the functions which retum com-
plex data structures. Without specifying an implementation of a Stare, it is Safe to say that it will contain
and control memory needed to hold the data retumed by these functions and also contain some bookkeep-
ing information about the contents and size of the ,Iiernory.
The semantics of the Stare resource provide two levels of memory management. The implementation is
responsible for managing the memory at level because it reuses, allocates and deallocates
a low uses,
memory from the System in Order to retum inform ation . But the application is ultimately
to the appli cation
responsible for managing the memory at a high level because it creates and deletes Stores.
A Store is passed as a Parameter to a function retuming complex data structures. Another Parameter to this
function is a pointer to a pointer to a structure which defines the format of the retumed data. The Stare
contains memory for the structure and any additional memory referenced by fields within the structure. The
application accesses the retumed data through its pointer to the structure. It does not use the Store to access
the data.
A Stare continues to hold the information from the function until the Store is deleted by the DELETE
STORE function or until the Store is used as an argument to a subsequent function, which retums complex
ISOhEC 8806-4 : 199l(E)
GKS=3D/C
Memory Management The C Language Binding of GKS-3D
data structwes. At that time, the old information is replaced with the new. Thus multiple calls to functions
overwrite the contents of a Stare. A Store only contains the results of the last function.
This part of ISO/IEC 8806 defines two new errors that tan occur when using or creating a Stare; these
errors are described in 3.10.3. For most functions using a Stare, these and other errors are retumed via the
“error indicator” Parameter. However, the function ESCAPE does not have an error indicator Parameter.
For this function, the error reporting mechanism is used when an error is encountered. For this function, the
implementation shall, in addition to reporting the error, set the pointer to the retumed data to NULL when
an error occurs. See the binding of these functions for more information.
The defkritions for the functions CRFATE STORE and DELETE STORE follow:
CREATE STORE
GKOP, WSOP, WSAC, SGOP LOa
Parameters:
out error indicator 1
out store STORE
Effkct: Creates a Store and retums a handle to it in the output Parameter store. If the Store cannot be creat-
ed, the store Parameter is set to NULL and the error indicator is set to one of the following error values:
GKS-3D not in proper state; GKS-3D shall be in one of the states GKOP, WSOP, WSAC or SGOP
2203 Error while allocating Store
Errors: None.
DELETE STORE GKOP, WSOP, WSAC, SGOP LOa
Parameters:
out error indicator 1
InJOut store STORE
Effect: Deletes the Store and all intemal resources associated with it. If there is not an error, the Parameter
store will be set to NULL to signify that it is no longer valid. If an error is detected, the error indicator
is set to one of the following values:
8 GKS-3D not in proper state; GKS-3D shall be in one of the states GKOP, WSOP, WSAC or SGOP
Errors: None.
In 7.10.2, the C specification of these functions is given. In annex E, a possible underlying mechanism is
illustrated.
3.10 Error Handling
3.10.1 Application Supplied Error Handlers
User-defked error hanalers shaIl accept the same arguments as the Standard error handler. The user-
defked error handler is specified by the Utility function (see also 7.10.2)
GKS=3D/C ISO/IEC 8806-4 : 1991(E)
Error Handling
The C Language Binding of GKS-3D
GKCL, GKOP, WSOP, WSAC, SGOP LOa
SET ERROR HANDLER
Parameters:
In New error handling function Function
out Old error handling function Function
Effect: Sets the GKS-3D error handling function to New error handlingfinction and retums the current er-
ror handling function to OZd error handlingfuncrion.
Errors: None.
Application defined error handling functions accept the same arguments as the Standard error handIer. They
may invoke the Standard error logging function ERROR LOGGING.
ISO 8809 defines the initial error handling function to be ERROR HANDLING, that is, the value of the
Parameter Old error handlingfunction Points to ERROR HANDLING, when SET ERROR HANDLER is
called for the first time.
When the application changes the error handling function, the implementation will invoke the new function
when an error is detected. If the application calls the default error handling function ERROR HANDLING,
ERROR HANDLING will always call the function ERROR LOGGING.
If New error handler is not a valid pointer, the error handling will automatically be done by the Standard
error handler ERROR HANDLING.
User-denried error handlers may invoke the Standard error logging function ERROR LOGGING.
3.10.2 Error Codes
Hard coding numbers into a program decreases its maintainability. Therefore, this part of ISO/IEC 8806
def‘mes a set of constants for the GKS-3D error numbers. Esch error constant begins with the characters
GE . See also 6.2 for the error macros.
-
3.10.3 C-specific GKS-3D errors
This part of ISO/IEC 8806 knows some specific error messages. This section gives the messages and the
error macros.
Value Message
2200 Start index out of range
1s issued when the Start index is less than zero or larger
than the last element in the implementation’s list
2201 Length of application list is negative
1s issued when the length of the application’s list is less than zero
2202 Enumeration type out of range
of the enumeration
1s issued when a Parameter value whose type is an enumeration is out range
2203 Error while allocating Store
1s issued when an error is detected during CREATE STORE
2204 Error while allocating memory for Store
S tore
1s issued when a function using a Store is unable to allocate memory for the
3.11 Colour Representations
GKS-3D def‘mes 4 colour models (RGB, CIE L*u*v* 1976. HLS and HSV) of which RGB and CIE
Gcieluv,
L*u*v* are mandatory. For each of these models, a colour spectication is defined ( Grgb,
Ghsv, Ghls ). The colour representation is defined in GKS=3D/C as

ISOhEC 8806-4 : 1991fE) GKS=3D/C
Colour Representations The C Language Binding of GKS-3D
typedef Union {
Grgb /* Red Green Blue colour specification */
rgb ;
Gcieluv cieluv; /* CIE L*u*v* 1976 colr. spec.
*/
Ghls hls; /* Hue Luxninance Saturation colr. spec. */
Ghsv hsv; /* Hue Saturation Value colr. spec.
*/
Gdata /* irnpl. dep. colr. spec.
impldep; "l
} Gcolr rep;
-
which guarantees extensibility of GKS-3D/C for other colour models.
3.12 Storage of Multi-dimensional Arrays
3.12.1 Storage of 2*3 Matrices
The entries of Gtran matrix data types shall be stored such that the Segment transformation is defined
-
bY
Tp.x = Inat[O,O]*p.x + mat[O,l]*p.y + matco,21;
Tp.y = mat[l,O]*p.x + mat[l,l]*p.y + In& [1,2];
where p is a2Dpoint, Tpitstransformation and mat is of type Gtran matrix-
-
3.12.2 Storage of 3*4 Matrices
The entries of Gtran matrix3 data types shall be stored such that the Segment transformation is
-
defined by
Tp.x = mat[O,O]*p.x + mat[OJ]*p.y + Inat[0,2]*p.z + Inat
10,31;
Tp.y = Inat[l,O]*p.x + mat[1,1]*p.y + Inat[1,2]*p.Z + mat
CL31;
Tp.z = mat[2,O]*p.x + mat[2,1]*p.y + Inat[2,2]*p.z + Inat
c2,31;
where p is a 3D Point, Tp its transformation and mat is of type Gtran matrix3.
-
3.12.3 Storage of 4*4 Matrices
The entries of Gmatrix3 data types shaU be stored such that the projection transformation is defined by
Tp.x = x'/w' ;
Tp.y =
y’ /w' ;
Tp.z = z'/w' ;
x' =
Inat[O,O]*p.x + mat[O,l]*p.y + IMt[0,2]*p.z +
-t[0,31;
y’ =
xnat[1'0]*p.x + mat[l,l]*p.y + xnat[1'2]*p.Z +
~t[1’31;
-
-
2’ mat[2'0]*p.x + mat[2,11*p.y + Inat[2'2]*p.z +
mt[2,31;
w’ =
Inat[3,1]*p.y + rnat[3,2]*p.z +
rnat[3,O]*p.x + mtPf33;
where p is a 3D Point, Tp its projection transformation and mat is of type Gmatrix3.
3.12.4 Storage of Colour Arrays
The entries of Gpat rep data types shall be stored such that the colour index at the (ij)-th entry is given
-
bY
= + DX*j];
CO~ indi j colr rect.colr array[i
-
,
i = O,., IX-l; - j = 0,. . . ,DY- 1;
DX = colr rect.dims.size x; DY = colr-rect.di.ms.sizejr;
- -
where col=rect isoftype Gpat rep.
-
ISO/IEC 8806-4 : 1991(E)
GKS-3D/C
4 Tables
4.1 Abbreviation Policy in Construction of Identifiers
In the construction of the several data types, function names, etc., the following policy is applied:
1) All identifiers in the C binding are abbreviated using the same abbreviations for every component
and using underscores to denote blanks;
2) The plural of an expression is constructed by adding an “s” after its abbreviation; so, for example,
“vector” is abbreviated to “vec” and “vectors” is abbreviated to “vecs”; if an expression is mapped
to NULL, so will be its Plural;
3) Digits are also preceded by underscores, except for the 3, if the 3D extension is denoted;
4) The words POLYLINE, POLYMARKER and FILL AREA (SET) are not abbreviated in the output
primitive function names; in all other cases they are abbreviated using the list in 4.2;
5) Construction of GKS-3D/C identifiers:
Function names:
a)
“g” (lower case) followed by abbreviated function name in lower case;
Data types:
W
“G” (upper case) followed by abbreviated data type in lower case;
“redundant” (words in the field name
Fields of data types; the following refinements are used:
c)
that are identical to those in the structure name) parts arc omitted, if the context allows this; thus
the colour index in the field of Gxxx bundle is abbreviated to colr ind, because the
-
-
context makes clear which colour index is used;
Function macros:
d)
"Gf n ” followed by abbreviation of function name;
-
GKSM item types:
e)
"Gksm ” followed by abbreviation of item name;
-
Error macros:
f)
"GE " followed some abbreviated expression;
bY
-
Fields of enumeration types:
g)
the field name; this prefix
“G” (upper case) followed by a prefk followed by an abbreviation of
is constant for each enumeration field; all the fields arc in upper case;
4.2 Table of Abbreviations Used
In this table, only words which arc abbreviated are listed. They are used for
function names;
data types;
fields of data types;
error macros;
GKSM item types.
The word “NULL” denotes those words which arc deleted completely when forming function names or
data types.
Abbreviation
Word or Phrase
NULL
accepted
ISO/IEC 8806-4 : 1991(E)
GKS=3D/C
Table of Abbreviations Used
Tables
accumulate accum
action NULL
actual act
addition add
alignment
a-&F
allocate alloc
and NULL
application
aPP1
arithmetic
alith
as soon as possible asap
aspect Source flag asf
associate(d) assoc
at some time asb
at NULL
attribute attr
availability avail
available avail
before the next interaction globally bnig
before the next interaction locally
bnil
between
NULL
buffer
buf
cannot
cant
category tat
centre CtI
Character char
CIE L*u*v* (colour model) cieluv
classification class
clipping Clip
tollinear col
colour colr
concatenation concat
conditional(ly) cond
connection COM
control ctrl
coordinate
comer
current CUlY
dashed dash
default def
deferral defer
delete del
deletion del
detectability det
detectable det
device coordinate( s) dc
device(s) NULL
. .
digital dlg1t
dimension dim
.
dlr
direction
.
display
d=P
distance NULL
dotted
GKS-3D/C ISO/IEC 8806-4 : 1991fE)
Tables Table of Abbreviations Used
duplicate
dup
dynamic
dYn
equal
eq
error err
evaluate eval
expnsion
-Pm
facility fac
factor NULL
fU area fill
from NULL
function func
generalized drawing primitive
gdp
gks closed C
w
gks open gkop
NULL
gksm
graphical
graph
handling hand
height ht
hidden li.ne/hidden surfte removal hlhsr
highlighted highl
highlighting highl
horizontal hor
hue lightness Saturation (colour model) hk
hue Saturation value (colour model) hsv
identifier id
immediate(ly) imm
implicit regeneration
l%
implici t impl
in use
NULL
in
NULL
index
ind
indicator
ind
individual indiv
initial
init
initialize init
input/output io
input in
inquire inq
integer int
interior int
invalid inval
invisible invis
length NULL
less than or equal le
less than lt
level x IX (with x = Oa, Ob, . .)
library lib
locator 1oC
logical NULL
lUmi.naIlCe
maPPing
maximum
ISO/IEC 8806-4 : 1991(E)
GKS-3D/C
Table of Abbreviations Used
Tables
memory
mem
metafile input
mi
metafile output mo
minimum
min
modification mod
monochrome monochr
necessary nee
nominal nom
normal norm
normalization norm
normalized device coordinate( s) ndc
number num
0t
NULL
on
NULL
operating
OP
orientation 0I-l
output and input outin
output out
overfiow overf
parallel( ogram)
Pard
Pattern
Pst
pending pend
perspective perspect
pointer
Pn
polyline line
polymarker marker
Position
Pos
precision prec
predefined
pred
presence pres
primitive
P”n
.
priority
P”
projection
Pr@
prompt and echo type
Pet
prompt
Pr
queue NULL
record NULL
rectangle rect
red green blue (colour model)
%b
reference ref
regeneration regen
registered r
relative rel
representation
rep
request(ed)
Fl
rubber rub
Saturation satur
scale factor NULL
Segment open
sgop
Segment
sei5
select sel
simultaneous(ly) simult
GKS-3D/C ISO/IEC 3806-4 : 1991(E)
Tables Table of Abbreviations Used
spacing space
specification specif
specified specif
state
storage
supported
suppressed
suPPr
to NULL
tracking track
transform( ation) tran
unavailable unavail
undefined undef
undetectable undet
unregistered U
update
used
valuator
value
vector
vertical
viewport
visibility VlS
visible vis
volume vol
which NULL
window win
with NULL
workstation active wsac
workstation independent Segment store
wiss
open
workstation wsop
workstation
world coordinate
4.3 Function Names
4.3.1 List Ordered Alphabetically by Bound Name
gaccum tran rnatrix ACCUMULATE TRANSFORMATION MATRIX
gaccumXanYnatrix3 ACCUMULATE TRANSFORMATION MATRIX 3
gactiGte wS ACI’IVATE WORKSTATION
gassoc sei WS ASSOCIATE SEGMENT WITH WORKSTATION
gawaitL& AWAIT EVENT
gcell Grray CELLARRAY
gcelGrray3
CEiLL ARRAY 3
gcleG WS CLEAR WORKSTATION
gclosegks CLOSE GKS
gclose-seg CLOSE SEGMENT
gclose-ws CLOSE WORKSTATION
gcopy Geg WS COPY SEGMENT FROM WORKSTATION
gcreate Gg CREATE SEGMENT
gcreate-store CREATE STORE (GKS-3D/C only)
gdeacti%e WS DEACTIVATE WORKSTATION
-
ISO/IEC 8806-4 : 1991(E)
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...