X3D Field Types
Fields are the elemental data types used by X3D to define the properties of nodes. There are two classes of fields: Single-valued fields (start with SF) and Multi-valued fields (start with MF). Multi-valued fields are contained as ordered lists.
It's also important to know that each node will define how to access a particular field. X3D defines four types of field access:
- initializeOnly: allows content to supply an initial value for the field but does not allow subsequent changes to its value
- inputOnly: nodes may receive an event to change the value of its field, but does not allow the field's value to be read
- outputOnly: nodes may send an event when its value changes, but does not allow the field's value to be written
- inputOutput: full access to the field is allowed. content may supply an initial value for the field, the node may receive an event to change the value of its field, and the node may send an event when its value changes
Fields are important when dealing with things such as interactivity. Routing events between nodes require exact mapping of node field types.
SFBool
Value Type | Default Value |
---|---|
Boolean | FALSE |
... |
MFBool
Value Type | Default Value |
---|---|
Boolean (0 - N) | Empty List |
... |
SFColor
Value Type | Default Value |
---|---|
RGB Color Value | 0.0 0.0 0.0 |
Floating Point Number (0.0 - 1.0) |
MFColor
Value Type | Default Value |
---|---|
RGB Color Values (0 - N) | Empty List |
Floating Point Number (0.0 - 1.0) |
SFColorRGBA
Value Type | Default Value |
---|---|
RGBA Color Value | 0.0 0.0 0.0 0.0 |
Floating Point Number (0.0 - 1.0) |
MFColorRGBA
Value Type | Default Value |
---|---|
RGBA Color Values | 0.0 0.0 0.0 0.0 |
Floating Point Number (0.0 - 1.0) |
SFDouble
Value Type | Default Value |
---|---|
Double-precision floating point number | 0.0 |
... |
MFDouble
Value Type | Default Value |
---|---|
Double-precision floating point numbers (0 - N) | Empty List |
... |
SFFloat
Value Type | Default Value |
---|---|
Single-precision floating point number | 0.0 |
... |
MFFloat
Value Type | Default Value |
---|---|
Single-precision floating point numbers (0 - N) | Empty List |
... |
SFImage
Value Type | Default Value |
---|---|
2D pixel image (width, height, # components, width x height hex/integer values) | 0 0 0 |
... |
MFImage
Value Type | Default Value |
---|---|
SFImages (0 - N) | Empty List |
... |
SFInt32
Value Type | Default Value |
---|---|
32 bit integer | 0 |
Signed integer |
MFInt32
Value Type | Default Value |
---|---|
32 bit integers (0 - N) | Empty List |
Signed integer |
SFMatrix3d
Value Type | Default Value |
---|---|
3x3 matrix double-precision floating point number | [1 0 0 0 1 0 0 0 1] |
Organized in row-major fashion |
MFMatrix3d
Value Type | Default Value |
---|---|
3x3 matrix double-precision floating point numbers (0 - N) | Empty List |
... |
SFMatrix3f
Value Type | Default Value |
---|---|
3x3 matrix single-precision floating point number | [1 0 0 0 1 0 0 0 1] |
Organized in row-major fashion |
MFMatrix3f
Value Type | Default Value |
---|---|
3x3 matrix single-precision floating point numbers (0 - N) | Empty List |
... |
SFMatrix4d
Value Type | Default Value |
---|---|
4x4 matrix double-precision floating point number | [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1] |
Organized in row-major fashion |
MFMatrix4d
Value Type | Default Value |
---|---|
4x4 matrix double-precision floating point numbers (0 - N) | Empty List |
Organized in row-major fashion |
SFMatrix4f
Value Type | Default Value |
---|---|
4x4 matrix single-precision floating point number | [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1] |
Organized in row-major fashion |
MFMatrix4f
Value Type | Default Value |
---|---|
4x4 matrix single-precision floating point number | Empty List |
Organized in row-major fashion |
SFNode
Value Type | Default Value |
---|---|
X3D Node | NULL |
... |
MFNode
Value Type | Default Value |
---|---|
X3D Nodes (0 - N) | Empty List |
... |
SFRotation
Value Type | Default Value |
---|---|
arbitrary rotation | 0 0 1 0 |
Floating point values (x y z radians) |
MFRotation
Value Type | Default Value |
---|---|
arbitrary rotations | Empty List |
... |
SFString
Value Type | Default Value |
---|---|
UTF-8 encoded string | Empty String |
Written as UTF-8 octets |
MFString
Value Type | Default Value |
---|---|
UTF-8 encoded strings (0 -N) | Empty List |
... |
SFTime
Value Type | Default Value |
---|---|
Double-precision floating point number | -1 |
... |
MFTime
Value Type | Default Value |
---|---|
Double-precision floating point numbers (0 - N) | Empty List |
... |
SFVec2d
Value Type | Default Value |
---|---|
One pair double-precision floating point values | 0 0 |
... |
MFVec2d
Value Type | Default Value |
---|---|
SFVec2d (0 - N) | Empty List |
... |
SFVec2f
Value Type | Default Value |
---|---|
One pair single-precision floating point values | 0 0 |
... |
MFVec2f
Value Type | Default Value |
---|---|
SFVec2f (0 - N) | Empty List |
... |
SFVec3d
Value Type | Default Value |
---|---|
3-tuple double-precision floating point numbers | 0 0 0 |
... |
MFVec3d
Value Type | Default Value |
---|---|
SFVec3d (0 - N) | Empty List |
... |
SFVec3f
Value Type | Default Value |
---|---|
3-tuple single-precision floating point numbers | 0 0 0 |
... |
MFVec3f
Value Type | Default Value |
---|---|
SFVec3f (0 - N) | Empty List |
... |
SFVec4d
Value Type | Default Value |
---|---|
4-tuple double-precision floating point numbers | 0 0 0 1 |
... |
MFVec4d
Value Type | Default Value |
---|---|
SFVec4d (0 - N) | Empty List |
... |
SFVec4f
Value Type | Default Value |
---|---|
4-tuple single-precision floating point numbers | 0 0 0 1 |
... |
MFVec4f
Value Type | Default Value |
---|---|
SFVec4f (0 - N) | Empty List |
... |