Part 1:  Humanoid animation (HAnim) architecture

5 Abstract data types

--- HAnim separator bar ---

cube 5.1 General

5.1.1 Overview

This clause describes the syntax and general semantics of data types used by HAnim to define the properties of HAnim objects.

5.1.2 Topics

Table 5.1 lists the major topics in this clause.

Table 5.1 — Topics

5.1.3 Classes of data types

There are three classes of data types:

  1. elemental value data types,
  2. fixed length arrays of elemental values, and
  3. sequences of elemental values or arrays.

The elemental value data types are Boolean, float, integer, Object, and string.

cube 5.2 Elemental value data types

5.2.1 Boolean

The Boolean data type specifies one logical value that may take either of the values "true" or "false".

NOTE:  Although the Boolean data type is not used in this part of this document, it is required in other parts.

5.2.2 float

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.

5.2.3 integer

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)].

5.2.4 Object

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 document to a presentation system. The types of HAnim 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 HAnim figures are specified as allowed by 6 Object interfaces.

5.2.5 string

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:

  1. UCS-2 (Universal Coded Character Set-2). This form is also known as the Basic Multilingual Plane (BMP). Characters are encoded in the lower two octets (row and cell).
  2. UCS-4 (Universal Coded Character Set-4). Characters are encoded in the full four octets.

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.

cube 5.3 Array data types

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

cube 5.4 Sequence data types

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

--- HAnim separator bar ---