H-Anim logo

Humanoid animation (H-Anim)

5 Abstract data types

--- H-Anim separator bar ---

cube 5.1 General

5.1.1 Introduction

This clause describes the syntax and general semantics of data types used by H-Anim to define the properties of H-Anim 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 float, integer, Object, and string.

cube 5.2 Elemental value data types

5.2.1 float

The float data type specifies one single-precision floating point value.

5.2.2 integer

The integer data type specifies one 32-bit integer value.

5.2.3 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 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.

5.2.4 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:


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:


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

--- H-Anim separator bar ---