The Annotated VRML 97 Reference

1 Intro     Concepts     3 Nodes     4 Fields/Events    Conformance
A Grammar     B Java     C JavaScript     D Examples     E Related Info    References
Quick Java         Quick JavaScript         Quick Nodes   
 

  About the Book
  
Help
  Copyright © 1997-99
  Purchase the book from Amazon.com

Chapter 3:
Node Reference


Intro
Anchor
Appearance
AudioClip
Background
Billboard
Box
Collision
Color
ColorInterpolator
Cone
Coordinate
CoordinateInterpolator
Cylinder
CylinderSensor
DirectionalLight
ElevationGrid
Extrusion
Fog
FontStyle
Group
ImageTexture
IndexedFaceSet
IndexedLineSet
Inline
LOD
Material
MovieTexture
NavigationInfo
Normal
NormalInterpolator
OrientationInterpolator
PixelTexture
PlaneSensor
PointLight
PointSet
PositionInterpolator
ProximitySensor
ScalarInterpolator
Script
Shape
Sound
Sphere
SphereSensor
SpotLight
Switch
Text
TextureCoordinate
TextureTransform
TimeSensor
TouchSensor
Transform
Viewpoint
VisibilitySensor
WorldInfo

+3.55 WorldInfo

WorldInfo { 
  field MFString info  []
  field SFString title ""
}

The WorldInfo node contains information about the world. This node is strictly for documentation purposes and has no effect on the visual appearance or behaviour of the world. The title field is intended to store the name or title of the world so that browsers can present this to the user (perhaps in the window border). Any other information about the world can be stored in the info field, such as author information, copyright, and usage instructions.

TIP: You can use WorldInfo nodes to save title, copyright, credit, statistical, and authoring data. This can be included in the final published file or stripped out in the last step. It is recommended that you place this information at the top of the file, so that others notice it. Typically, only the first WorldInfo node in the file specifies the title field. If you have information that applies to a specific object in the file, create a Group node, insert a WorldInfo as the first child in the Group, and add the relevant nodes as subsequent children (see the following example).

EXAMPLE (click to run): The following example illustrates a few simple uses of the WorldInfo node. The first WorldInfo specifies the world's title, overall credits, legal information, and authoring data pertaining to the entire file. The second WorldInfo is used as a lightweight stand-in node for an empty level of an LOD node. The third WorldInfo documents a specific object in the scene (the Cone). In this case, the author has specified that if anyone wishes to reuse this data, they must retain the WorldInfo node and thus give credit to the original author. The third example also illustrates how an authoring system can store technical data for future editing sessions. It is recommended that authors (and authoring systems) strip out this extra data during the publishing step to reduce download time:
#VRML V2.0 utf8
WorldInfo {    # Title and documentation for this file
  title "The Annotated VRML97 Reference Manual world"
  info [ "Copyright (c) 1997 by Rikk Carey and Gavin Bell",
         "Published by Addison-Wesley Publishing Co., Inc.",
         "All rights reserved.  etc.",
         "Created using XYZ Author: version 4.3 ..." ]
}
Group {
  children [
    LOD {  
      range [ 10 ]
      level [
        Shape { geometry Sphere { radius 2 } }
        WorldInfo {}        # Empty level standin
      ]
    }
    Group {
      children [
        WorldInfo {          # Doc for this object
          info [
            "DO NOT REMOVE THIS INFORMATION.",
            "Copyright (c) by John Smith",
            "The following object was created ...",
            "Modeling information: x=123.45 y=42, a=666 ...",
            "Tips: This object is centered at 0,0,0..." ]
        }
        Shape {
          geometry Cone {}
          appearance Appearance { material Material {} }
        }
      ]
    }
  ]
}