5.1 Introduction
5.1.1 Table of contents
5.1.2 Description
5.2 SFBool
5.3 SFColor and MFColor
5.4 SFFloat and MFFloat
5.5 SFImage
5.6 SFInt32 and MFInt32
5.7 SFNode and MFNode
5.8 SFRotation and MFRotation
5.9 SFString and MFString
5.10 SFTime and MFTime
5.11 SFVec2f and MFVec2f
5.12 SFVec3f and MFVec3f
This clause describes the syntax and general semantics of fields, the elemental data types used by VRML nodes to define objects (see ISO/IEC 14772-1, 6, Node reference). Nodes are composed of fields (see ISO/IEC 14772-1, 4, Concepts).
There are two general classes of fields: fields that contain a single value (where a value may be a single number, a vector, or even an image), and fields that contain an ordered list of multiple values.
Single-valued fields are written as ...
Multiple-valued fields are written as ...
The SFBool field specifies a single boolean value. SFBools are written as ...
The SFColor field specifies one RGB (red-green-blue) colour triple. MFColor specifies zero or more RGB triples. Each colour is written to the VRML file as an RGB triple of floating point numbers in IEEE 1xxx floating point format (see 2.[IEEE]) in the range 0.0 to 1.0.
The SFFloat field specifies one single-precision floating point number. MFFloat specifies zero or more single-precision floating point numbers. SFFloats and MFFloats are written to the VRML file in IEEE 1xxx floating point format (see 2.[IEEE]).
The SFImage field or event specifies a single uncompressed 2-dimensional pixel image. SFImage fields and events are written to the VRML file as three integers representing the width, height and number of components in the image, followed by width*height hexadecimal or integer values representing the pixels in the image, separated by whitespace:
The SFInt32 field specifies one 32-bit integer. The MFInt32 field specifies zero or more 32-bit integers. SFInt32 and MFInt32 fields and events are written to the VRML file as an integer in 2's- complement form.
The SFNode field specifies a VRML node. The MFNode field specifies zero or more nodes.
The SFRotation field specifies one arbitrary rotation. The MFRotation field specifies zero or more arbitrary rotations. An SFRotation is written to the VRML file as four IEEE 1xxx floating point values (see 2.[IEEE]).
The SFString and MFString fields contain strings formatted with the UTF-8 universal character set (see 2.[UTF8]). SFString specifies a single string. The MFString specifies zero or more strings. Strings are written to the VRML file as a sequence of UTF-8 octets enclosed in double quotes (e.g., "string").
Any characters (including linefeeds and '#') may appear within the quotes.
The SFTime field specifies a single time value. The MFTime field specifies zero or more time values. Time values are written to the VRML file as a double-precision floating point number in IEEE 1xxx floating point format (see 2.[IEEE]). Time values are specified as the number of seconds from a specific time origin. Typically, SFTime fields represent the number of seconds since Jan 1, 1970, 00:00:00 GMT.
The SFVec2f field specifies a two-dimensional (2D) vector. An MFVec2f field specifies zero or more 2D vectors. SFVec2f's and MFVec2f's are written to the VRML file as a pair of IEEE 1xxx floating point values (see 2.[IEEE]). For example:
The SFVec3f field specifies a three-dimensional (3D) vector. An MFVec3f field specifies zero or more 3D vectors. SFVec3f's and MFVec3f's are written to the VRML file as three IEEE 1xxx floating point values (see 2.[IEEE]). For example: