Humanoid animation (H-Anim)
5 Abstract data types
This clause describes the syntax and general semantics of data types used by H-Anim to define the properties of H-Anim objects.
Table 5.1 lists the major topics in this clause.
There are three classes of data types:
The elemental value data types are float, integer, Object, and string.
The float data type specifies one single-precision floating point value.
The integer data type specifies one 32-bit integer value.
The Object data type represents a set of fields of other data types and/or other Object data types. The exact form of the representation of an instance of Object is specified by the binding of this International Standard to a presentation system. The types of H-Anim objects that may be specified by instances of the Object data type are defined in 6 Object interfaces. The object data type may also represent objects from the representation system in which the H-Anim figures are specified as allowed by 6 Object interfaces.
The string data type represents text strings encoded with the UTF-8 universal character set (see ISO/IEC 10646). Instances of the string data type are specified as a sequence of UTF-8 octets.
Any characters (including linefeeds and '#') may appear within the string.
UTF-8 characters in ISO/IEC 10646 are encoded in multiple octets. Code space is divided into four units, as follows:
+-------------+-------------+-----------+------------+ | Group-octet | Plane-octet | Row-octet | Cell-octet | +-------------+-------------+-----------+------------+
ISO/IEC 10646 allows two basic forms for characters:
In addition, two transformation formats (UCS Transformation Format or UTF) are accepted: UTF-8 and UTF-16. Each represents the nature of the transformation: 8-bit or 16-bit. UTF-8 and UTF-16 are referenced in ISO/IEC 10646.
UTF-8 maintains transparency for all ASCII code values (0..127). It allows ASCII text (0x0..0x7F) to appear without any changes and encodes all characters from 0x80..0x7FFFFFFF into a series of six or fewer bytes.
If the most significant bit of the first character is 0, the remaining seven bits are interpreted as an ASCII character. Otherwise, the number of leading 1 bits indicates the number of bytes following. There is always a zero bit between the count bits and any data.
The first byte is one of the following. The X indicates bits available to encode the character:
0XXXXXXX only one byte 0..0x7F (ASCII) 110XXXXX two bytes Maximum character value is 0x7FF 1110XXXX three bytes Maximum character value is 0xFFFF 11110XXX four bytes Maximum character value is 0x1FFFFF 111110XX five bytes Maximum character value is 0x3FFFFFF 1111110X six bytes Maximum character value is 0x7FFFFFFF
All following bytes have the format 10XXXXXX.
EXAMPLE As a two byte example, the symbol for a registered trade mark ®, encoded as 0x00AE in UCS-2 of ISO 10646-1, has the following two byte encoding in UTF-8: 0xC2, 0xAE.
An array is a fixed-length list of values of a single elemental data type. Arrays are represented in the following manner:
ElementalDataTypeName[n]
where ElementalDataTypeName is the elemental data type and n is the number of elements in the array.
EXAMPLE The following representation denotes that the field translation is an array of size 3 and each element of that array is of data type float:
float[3] translation
A sequence is an ordered list of arrays or elemental value data type values. Sequences of data type values are represented in the following manner:
sequence<DataType>
where DataType is the specification of an elemental value or array data type that describes each item of the sequence. A sequence does not have a fixed number of elements. A sequence may be empty indicating zero elements in the ordered list.
EXAMPLE The following representation denotes that the field coord is a sequence of arrays, where each array is of size 3 and each element of that array is of data type float:
sequence<float[3]> coord