Humanoid animation (H-Anim)
Part 1: Architecture
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 Boolean, float, integer, Object, and string.
The Boolean data type specifies one logical value
that may take either of the values
NOTE: Although the Boolean data type is not used in this part of this International Standard, it is required in other parts.
The float data type specifies one single-precision floating point value. Implementation of this data type is targeted at the single precision floating point capabilities of processors (often ISO/IEC/IEEE 60559). If floating point processing is not available, it is allowable to implement this data type using fixed point numbering provided at least six decimal digits of precision are maintained and that base 10 exponents have range of at least [-12, 12] for both positive and negative numbers.
The integer data type specifies one signed integer value supporting at least the range [-2,147,483,647, +2,147,483,647], that is [-(2-31 - 1), +(231 - 1)].
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:
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:
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:
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: