VRML Part 3 logo

6 Encoding of nodes

--- VRML separator bar ---

+ 6.1 Introduction

This clause provides a detailed definition of the syntax of each node in this part of ISO/IEC 14772. Table 6.1 lists the topics in this clause.

Table 6.1 -- Table of contents

6.1 Introduction
6.2 Anchor
6.3 Appearance
6.4 AudioClip
6.5 Background
6.6 Billboard
6.7 Box
6.8 Collision
6.9 Color
6.10 ColorInterpolator
6.11 Cone
6.12 Coordinate
6.13 CoordinateInterpolator
6.14 Cylinder
6.15 CylinderSensor
6.16 DirectionalLight
6.17 ElevationGrid
6.18 Extrusion
6.19 Fog
6.20 FontStyle
6.21 Group
6.22 ImageTexture
6.23 IndexedFaceSet
6.24 IndexedLineSet
6.25 Inline
6.26 LOD
6.27 Material
6.28 MovieTexture
6.29 NavigationInfo
6.30 Normal
6.31 NormalInterpolator
6.32 OrientationInterpolator
6.33 PixelTexture
6.34 PlaneSensor
6.35 PointLight
6.36 PointSet
6.37 PositionInterpolator
6.38 ProximitySensor
6.39 ScalarInterpolator
6.40 Script
6.41 Shape
6.42 Sound
6.43 Sphere
6.44 SphereSensor
6.45 SpotLight
6.46 Switch
6.47 Text
6.48 TextureCoordinate
6.49 TextureTransform
6.50 TimeSensor
6.51 TouchSensor
6.52 Transform
6.53 Viewpoint
6.54 VisibilitySensor
6.55 WorldInfo

In this clause, the first item in each subclause presents the VMRL encoding of the public declaration for the node. The node declaration defines the names and types of the fields and events for the node, as well as the default values for the fields.

For example, the following defines the Collision node declaration:

   Collision { 
      field MFNode   addChildren
      field MFNode   removeChildren
      field MFNode   children
      field SFBool   collide
      field SFVec3f  bboxCenter
      field SFVec3f  bboxSize
      field SFNode   proxy
      field SFTime   collideTime
    }

The following is an example of a the encoding of a collision node in a VRML file:

   Collision { 
      addChildren	[]
      removeChildren	[]
      children		[]
      collide		TRUE
      bboxCenter	0,0,0
      bboxSize		10,10,10
      proxy		[]
      collideTime	0
    }

Note that actual node usage does not specify the word "field" or the data type and does provide a value for the field. Not all fields must be present in any particular use of a node. Fields not provided will take on their initial values. Only the syntax for the nodes is shown. Semantics for the nodes and initial value as well as the initial values and value ranges for node fields can be found in ISO/IEC 14772-1--6. Node definitions.

--- VRML separator bar ---

+6.2 Anchor

Anchor { 
  field MFNode   addChildren
  field MFNode   removeChildren
  field MFNode   children
  field SFString description 
  field MFString parameter
  field MFString url
  field SFVec3f  bboxCenter
  field SFVec3f  bboxSize
}

--- VRML separator bar ---

+6.3 Appearance

Appearance { 
  field SFNode material
  field SFNode texture
  field SFNode textureTransform
}

--- VRML separator bar ---

+6.4 AudioClip

AudioClip { 
  field   SFString description
  field   SFBool   loop
  field   SFFloat  pitch
  field   SFTime   startTime
  field   SFTime   stopTime
  field   MFString url
  field   SFTime   duration_changed
  field   SFBool   isActive
}

--- VRML separator bar ---

+6.5 Background

Background { 
  field SFBool   set_bind
  field MFFloat  groundAngle
  field MFColor  groundColor
  field MFString backUrl
  field MFString bottomUrl
  field MFString frontUrl
  field MFString leftUrl
  field MFString rightUrl
  field MFString topUrl
  field MFFloat  skyAngle
  field MFColor  skyColor
  field SFBool   isBound
}

--- VRML separator bar ---

+6.6 Billboard

Billboard { 
  field MFNode   addChildren
  field MFNode   removeChildren
  field SFVec3f  axisOfRotation
  field MFNode   children
  field SFVec3f  bboxCenter
  field SFVec3f  bboxSize
}

--- VRML separator bar ---

+6.7 Box

Box { 
  field SFVec3f size
}

--- VRML separator bar ---

+6.8 Collision

Collision { 
  field MFNode  addChildren
  field MFNode  removeChildren
  field MFNode  children
  field SFBool  collide
  field SFVec3f bboxCenter
  field SFVec3f bboxSize
  field SFNode  proxy
  field SFTime  collideTime
}

--- VRML separator bar ---

+6.9 Color

Color { 
  field MFColor color
}

--- VRML separator bar ---

+ 6.10 ColorInterpolator

ColorInterpolator { 
  field SFFloat set_fraction
  field MFFloat key
  field MFColor keyValue
  field SFColor value_changed
}

--- VRML separator bar ---

+6.11 Cone

Cone { 
  field SFFloat bottomRadius
  field SFFloat height
  field SFBool  side
  field SFBool  bottom
}

--- VRML separator bar ---

+6.12 Coordinate

Coordinate { 
  field MFVec3f point
}

--- VRML separator bar ---

+6.13 CoordinateInterpolator

CoordinateInterpolator { 
  field SFFloat set_fraction
  field MFFloat key
  field MFVec3f keyValue
  field MFVec3f value_changed
}

--- VRML separator bar ---

+6.14 Cylinder

Cylinder { 
  field SFBool  bottom
  field SFFloat height
  field SFFloat radius
  field SFBool  side
  field SFBool  top
}

--- VRML separator bar ---

+6.15 CylinderSensor

CylinderSensor { 
  field SFBool     autoOffset
  field SFFloat    diskAngle
  field SFBool     enabled
  field SFFloat    maxAngle
  field SFFloat    minAngle
  field SFFloat    offset
  field SFBool     isActive
  field SFRotation rotation_changed
  field SFVec3f    trackPoint_changed
}

--- VRML separator bar ---

+6.16 DirectionalLight

DirectionalLight { 
  field SFFloat ambientIntensity
  field SFColor color
  field SFVec3f direction
  field SFFloat intensity
  field SFBool  on
}

--- VRML separator bar ---

+6.17 ElevationGrid

ElevationGrid { 
  field MFFloat set_height
  field SFNode  color
  field SFNode  normal
  field SFNode  texCoord
  field MFFloat height
  field SFBool  ccw
  field SFBool  colorPerVertex
  field SFFloat creaseAngle
  field SFBool  normalPerVertex
  field SFBool  solid
  field SFInt32 xDimension
  field SFFloat xSpacing
  field SFInt32 zDimension
  field SFFloat zSpacing
}

--- VRML separator bar ---

+6.18 Extrusion

Extrusion { 
  field MFVec2f    set_crossSection
  field MFRotation set_orientation
  field MFVec2f    set_scale
  field MFVec3f    set_spine
  field SFBool     beginCap
  field SFBool     ccw
  field SFBool     convex
  field SFFloat    creaseAngle
  field MFVec2f    crossSection
  field SFBool     endCap
  field MFRotation orientation
  field MFVec2f    scale
  field SFBool     solid
  field MFVec3f    spine
}

--- VRML separator bar ---

+6.19 Fog

Fog { 
  field SFColor  color
  field SFString fogType
  field SFFloat  visibilityRange
  field SFBool   set_bind
  field SFBool   isBound
}

--- VRML separator bar ---

+6.20 FontStyle

FontStyle { 
  field MFString family
  field SFBool   horizontal
  field MFString justify
  field SFString language
  field SFBool   leftToRight
  field SFFloat  size
  field SFFloat  spacing
  field SFString style
  field SFBool   topToBottom
}

--- VRML separator bar ---

+6.21 Group

Group { 
  field MFNode  addChildren
  field MFNode  removeChildren
  field MFNode  children
  field SFVec3f bboxCenter
  field SFVec3f bboxSize
}

--- VRML separator bar ---

+6.22 ImageTexture

ImageTexture { 
  field MFString url
  field SFBool   repeatS
  field SFBool   repeatT
}

--- VRML separator bar ---

+6.23 IndexedFaceSet

IndexedFaceSet { 
  field MFInt32 set_colorIndex
  field MFInt32 set_coordIndex
  field MFInt32 set_normalIndex
  field MFInt32 set_texCoordIndex
  field SFNode  color
  field SFNode  coord
  field SFNode  normal
  field SFNode  texCoord
  field SFBool  ccw
  field MFInt32 colorIndex
  field SFBool  colorPerVertex
  field SFBool  convex
  field MFInt32 coordIndex
  field SFFloat creaseAngle
  field MFInt32 normalIndex
  field SFBool  normalPerVertex
  field SFBool  solid
  field MFInt32 texCoordIndex
}

--- VRML separator bar ---

+6.24 IndexedLineSet

IndexedLineSet { 
  field MFInt32 set_colorIndex
  field MFInt32 set_coordIndex
  field SFNode  color
  field SFNode  coord
  field MFInt32 colorIndex
  field SFBool  colorPerVertex
  field MFInt32 coordIndex
}

--- VRML separator bar ---

+6.25 Inline

Inline { 
  field MFString url
  field SFVec3f  bboxCenter
  field SFVec3f  bboxSize
}

--- VRML separator bar ---

+6.26 LOD

LOD { 
  field MFNode  level 
  field SFVec3f center
  field MFFloat range
}

--- VRML separator bar ---

+6.27 Material

Material { 
  field SFFloat ambientIntensity
  field SFColor diffuseColor
  field SFColor emissiveColor
  field SFFloat shininess
  field SFColor specularColor
  field SFFloat transparency
}

--- VRML separator bar ---

+6.28 MovieTexture

MovieTexture { 
  field SFBool   loop
  field SFFloat  speed
  field SFTime   startTime
  field SFTime   stopTime
  field MFString url
  field SFBool   repeatS
  field SFBool   repeatT
  field SFTime   duration_changed
  field SFBool   isActive
}

--- VRML separator bar ---

+6.29 NavigationInfo

NavigationInfo { 
  field SFBool   set_bind
  field MFFloat  avatarSize
  field SFBool   headlight
  field SFFloat  speed
  field MFString type
  field SFFloat  visibilityLimit
  field SFBool   isBound
}

--- VRML separator bar ---

+6.30 Normal

Normal { 
  field MFVec3f vector
}

--- VRML separator bar ---

+6.31 NormalInterpolator

NormalInterpolator { 
  field SFFloat set_fraction
  field MFFloat key
  field MFVec3f keyValue
  field MFVec3f value_changed
}

--- VRML separator bar ---

+6.32 OrientationInterpolator

OrientationInterpolator { 
  field SFFloat    set_fraction
  field MFFloat    key
  field MFRotation keyValue
  field SFRotation value_changed
}

--- VRML separator bar ---

+6.33 PixelTexture

PixelTexture { 
  field SFImage image
  field SFBool  repeatS
  field SFBool  repeatT
}

--- VRML separator bar ---

+6.34 PlaneSensor

PlaneSensor { 
  field SFBool  autoOffset
  field SFBool  enabled
  field SFVec2f maxPosition
  field SFVec2f minPosition
  field SFVec3f offset
  field SFBool  isActive
  field SFVec3f trackPoint_changed
  field SFVec3f translation_changed
}

--- VRML separator bar ---

+6.35 PointLight

PointLight { 
  field SFFloat ambientIntensity
  field SFVec3f attenuation
  field SFColor color
  field SFFloat intensity
  field SFVec3f location
  field SFBool  on
  field SFFloat radius
}

--- VRML separator bar ---

+6.36 PointSet

PointSet { 
  field SFNode color
  field SFNode coord
}

--- VRML separator bar ---

+6.37 PositionInterpolator

PositionInterpolator { 
  field SFFloat set_fraction
  field MFFloat key
  field MFVec3f keyValue
  field SFVec3f value_changed
}

--- VRML separator bar ---

+6.38 ProximitySensor

ProximitySensor { 
  field SFVec3f    center
  field SFVec3f    size
  field SFBool     enabled
  field SFBool     isActive
  field SFVec3f    position_changed
  field SFRotation orientation_changed
  field SFTime     enterTime
  field SFTime     exitTime
}

--- VRML separator bar ---

+6.39 ScalarInterpolator

ScalarInterpolator { 
  field SFFloat set_fraction
  field MFFloat key
  field MFFloat keyValue
  field SFFloat value_changed
}

--- VRML separator bar ---

+6.40 Script

Script { 
  field MFString url 
  field SFBool   directOutput
  field SFBool   mustEvaluate
  # And any number of:
  field        fieldType fieldName initialValue
}

--- VRML separator bar ---

+6.41 Shape

Shape {
  field SFNode appearance
  field SFNode geometry
}

--- VRML separator bar ---

+6.42 Sound

Sound { 
  field SFVec3f direction
  field SFFloat intensity
  field SFVec3f location
  field SFFloat maxBack
  field SFFloat maxFront
  field SFFloat minBack
  field SFFloat minFront
  field SFFloat priority
  field SFNode  source
  field SFBool  spatialize
}

--- VRML separator bar ---

+6.43 Sphere

Sphere { 
  field SFFloat radius  1    # (0,)
}

--- VRML separator bar ---

+6.44 SphereSensor

SphereSensor { 
  field SFBool     autoOffset
  field SFBool     enabled
  field SFRotation offset
  field SFBool     isActive
  field SFRotation rotation_changed
  field SFVec3f    trackPoint_changed
}

--- VRML separator bar ---

+6.45 SpotLight

SpotLight { 
  field SFFloat ambientIntensity
  field SFVec3f attenuation
  field SFFloat beamWidth
  field SFColor color
  field SFFloat cutOffAngle
  field SFVec3f direction
  field SFFloat intensity
  field SFVec3f location
  field SFBool  on
  field SFFloat radius
}

--- VRML separator bar ---

+6.46 Switch

Switch { 
  field MFNode  choice
  field SFInt32 whichChoice
}

--- VRML separator bar ---

+6.47 Text

Text { 
  field MFString string
  field SFNode   fontStyle
  field MFFloat  length
  field SFFloat  maxExtent
}

--- VRML separator bar ---

+6.48 TextureCoordinate

TextureCoordinate { 
  field MFVec2f point
}

--- VRML separator bar ---

+6.49 TextureTransform

TextureTransform { 
  field SFVec2f center
  field SFFloat rotation
  field SFVec2f scale
  field SFVec2f translation
}

--- VRML separator bar ---

+6.50 TimeSensor

TimeSensor { 
  field SFTime  cycleInterval
  field SFBool  enabled
  field SFBool  loop
  field SFTime  startTime
  field SFTime  stopTime
  field SFTime  cycleTime
  field SFFloat fraction_changed
  field SFBool  isActive
  field SFTime  time
}

--- VRML separator bar ---

+6.51 TouchSensor

TouchSensor { 
  field SFBool  enabled
  field SFVec3f hitNormal_changed
  field SFVec3f hitPoint_changed
  field SFVec2f hitTexCoord_changed
  field SFBool  isActive
  field SFBool  isOver
  field SFTime  touchTime
}

--- VRML separator bar ---

+6.52 Transform

Transform { 
  field MFNode     addChildren
  field MFNode     removeChildren
  field SFVec3f    center
  field MFNode     children
  field SFRotation rotation
  field SFVec3f    scale
  field SFRotation scaleOrientation
  field SFVec3f    translation
  field SFVec3f    bboxCenter
  field SFVec3f    bboxSize
} 

--- VRML separator bar ---

+6.53 Viewpoint

Viewpoint { 
  field SFBool     set_bind
  field SFFloat    fieldOfView
  field SFBool     jump
  field SFRotation orientation
  field SFVec3f    position
  field SFString   description
  field SFTime     bindTime
  field SFBool     isBound
}

--- VRML separator bar ---

+6.54 VisibilitySensor

VisibilitySensor { 
  field SFVec3f center
  field SFBool  enabled
  field SFVec3f size
  field SFTime  enterTime
  field SFTime  exitTime
  field SFBool  isActive
}

--- VRML separator bar ---

+6.55 WorldInfo

WorldInfo { 
  field MFString info
  field SFString title
}

--- VRML separator bar ---