AGOCG logo
Graphics Multimedia VR Visualisation Contents
Training Reports Workshops Briefings Index
 Appendix A: Field Value Types previouscontentsstartnext

Field Value Types

The following table summarizes the different VRML field value types. There are single (SF) and multiple-value (MF) versions of most field types. A single value may consist of more than one component or element, such as a vector. These components are separated by white spaces. A multiple-value field is a list of zero or more single values, enclosed within square brackets and optionally separated by commas.
A single boolean value, written as either TRUE or FALSE.
SFColor and MFColor
A SFColor field contains 3 floating point values, ranging between 0.0 and 1.0, representing the red, green and blue colour components.
SFColor example: 1.0 0.0 0.0 defines a bright red colour
SFFloat and MFFloat
The SFFloat field has one floating point value. The MFFloat field contains zero or more floating point values.
MFFloat example: [-3.1415926, 12.5e-3, .0001]
SFImage defines a single uncompressed 2D pixel image, that is used in texture mapping. The format is <width> <height> <num components> <pixels values>.
SFImage example: 1 2 2 0xFF 0x00 0xFF 0x00
a 2x2 greyscale image forming a black (0x00) and white (0xFF) chequer-board pattern.
SFInt32 and MFInt32
A SFInt32 field contains a single 32-bit integer value. MFInt32 has zero or more integers.
MFInt32 example: [8, -67, 45]
SFNode and MFNode
A single VRML node (SFNode) or list of nodes (MFNode).
SFNode example: Cube { }
SFRotation and MFRotation
A SFRotation field has four components, the first three floating point values define the normalized rotation axis, the final value specifies the (right-handed) rotation in radians.
SFRotation example: 1 0 0 3.1415926 a 180° rotation about the x-axis.
SFString and MFString
SFString consists of a list of UTF-8 characters enclosed in double quotes.
MFString example: ["Hello World", "Goodbye"]
SFTime and MFTime
SFTime is a floating point value representing the number of seconds that have passed since midnight GMT, 1st January 1970.
SFVec2f and MFVec2f
A 2D vector described by two floating point values. Usually used to specify a 2D position.
MFVec2f example: [2.5 4.0, 0.1 0.5, 10.0 12.0]
SFVec3f and MFVec3f
A 3D floating point vector, typically used to define a 3D position.
SFVec2f example: 32.04 50 0.03


Graphics     Multimedia      Virtual Environments      Visualisation      Contents