xVRML Core Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace http://www.xvrml.net/schemas/core
Version 0.33.01 beta
Language en
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.
Documentation 'ChangeLog.html' is in reverse chronological order.
More information at: http://www.xvrml.net/schemas/ChangeLog.html.

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
More information at: http://creativecommons.org/licenses/by/1.0/.

World is the root node for an xVRML instance.

All attributes of all nodes are accessable after loading. A particular attribute of a particular node may be accessed in three ways. If the node has a non-empty name, then an attribute of that node may be accessed by the notation 'nodeName.attributeName'. A particular attribute of a particular node may also be accessed by treepath-index-value, as in the notation 'World.children[0].attributeName'. A particular attribute of a particular node may also be accessed using accessor and mutator functions following the function-naming pattern 'getAttributename()' or 'setAttributename()'.

Any element which contains "children" as a sub-element must also provide four accessor and mutator functions:

'addChild()' inserts one child node onto the end of the list of children of that element.

'removeChild()' removes a particular child from the list of children of that element.

'getChildren()' returns a list of all the children of that element.

'setChildren()' replaces the list of children of that element with a new list of children.

Declared Namespaces

Prefix Namespace
Default namespace http://www.xvrml.net/schemas/core
xml http://www.w3.org/XML/1998/namespace
xs http://www.w3.org/2001/XMLSchema
Schema Component Representation
<xs:schema xml:lang="en" targetNamespace="http://www.xvrml.net/schemas/core" attributeFormDefault="unqualified" elementFormDefault="qualified" version="0.33.01 beta">
...
</xs:schema>
top

Global Declarations

Element: Anchor

Name Anchor
Type Locally-defined complex type
Nillable no
Abstract no
Documentation children and url required.

When the user activates (e.g., selects with a pointing device) some geometry contained within the Anchor node's children, the Anchor node retrieves the contents at the URI listed in the url attribute. If that URI points to a valid xVRML file, then that World replaces the World of which the Anchor node is a part (except when the parameter field, described below, alters this behavior). If non-xVRML data is retrieved, then the xVRML application shall determine how to handle that data. Typically, it will be passed to an appropriate specialized media-handling application (in the case of a standalone xVRML viewer) or to the enclosing application (perhaps an xVRML Web browser plugin). By specifying a URI ending with "#ViewpointName" (where "ViewpointName" is the name attribute of a Viewpoint defined in the World being loaded), an Anchor node may be used to indicate the initial Viewpoint for the World being loaded. If the named Viewpoint is not found in the World being loaded, it is loaded using the default Viewpoint for that World.

The description may be used by application-specific user interfaces wishing to present users with more detailed information about the Anchor.

The parameter may be used to supply any additional information to be interpreted by the xVRML application. Each string shall consist of "keyword='value'" pairs.

bboxCenter and bboxSize specify a bounding box that encloses the Anchor's children. This is a hint that may be used for optimization purposes. Results are undefined if the specified bounding box is smaller than the actual bounding box of the children at any time. If the actual bboxSize value is the default bboxSize value of (-1, -1, -1), then this implies that the bounding box is not specified and if needed shall be calculated by the xVRML application.

Results are undefined if there are multiple Viewpoints with the same name in the Anchor's run-time name scope(s) (after Inlines have been processed).
XML Instance Representation
<Anchor
url=" xs:anyURI [1]"
description=" xs:string [0..1]"
parameter=" xs:string [0..1]"
bboxCenter=" SFVec3f [0..1]"
bboxSize=" SFVec3f [0..1]"
name=" xs:ID [0..1]">
<children> groupingAndChildrenNodes </children> [1]
</Anchor>
Schema Component Representation
<xs:element name="Anchor">
<xs:complexType>
<xs:sequence>
<xs:element name="children" type=" groupingAndChildrenNodes "/>
</xs:sequence>
<xs:attribute name="url" type=" xs:anyURI " use="required"/>
<xs:attribute name="description" type=" xs:string "/>
<xs:attribute name="parameter" type=" xs:string "/>
<xs:attribute name="bboxCenter" type=" SFVec3f " default="0.0 0.0 0.0"/>
<xs:attribute name="bboxSize" type=" SFVec3f " default="-1.0 -1.0 -1.0"/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: AudioClip

Name AudioClip
Type Locally-defined complex type
Nillable no
Abstract no
Documentation AudioClip should allow playback of at least the wavefile format in uncompressed PCM format (wav) and MPEG Audio Layer 3 (mp3).

AudioClip is a time-dependent node that activates and deactivates itself at specified times. AudioClip can execute for 0 or more cycles. A cycle is defined by data within the node. If, at the end of a cycle, the value of loop is FALSE, execution is terminated. Conversely, if loop is TRUE at the end of a cycle, an AudioClip continues execution into the next cycle. An AudioClip continues cycling forever if stopTime is equal to 0. AudioClip is inactive until its startTime is reached. When time now becomes greater than or equal to startTime, an AudioClip becomes active. Now refers to the time at which the virtual world is simulated and displayed by the application.

NOTE TO TEAM: we need to find a better way to deal with defining and expressing time, as "seconds since 1 JAN 1970" makes sense only to programmers.

url specifies the URI from which the sound is loaded.

The pitch field specifies a multiplier for the rate at which sampled sound is played. Values for the pitch field shall be greater than zero. Changing the pitch field affects both the pitch and playback speed of a sound. If pitch is set to 2.0, the sound shall be played one octave higher than normal and played twice as fast. For a sampled sound, the pitch field alters the sampling rate at which the sound is played.

description specifies a textual description of the audio source. An application is not required to display the description field but may choose to do so in addition to playing the sound.

startTime, stopTime, and url required.
XML Instance Representation
<AudioClip
url=" xs:anyURI [1]"
pitch=" xs:float [0..1]"
loop=" xs:boolean [0..1]"
description=" xs:string [0..1]"
name=" xs:ID [0..1]">
<startTime> xs:dateTime </startTime> [0..1]
<stopTime> xs:dateTime </stopTime> [0..1]
</AudioClip>
Schema Component Representation
<xs:element name="AudioClip">
<xs:complexType>
<xs:sequence>
<xs:element name="startTime" type=" xs:dateTime " minOccurs="0" maxOccurs="1"/>
<xs:element name="stopTime" type=" xs:dateTime " minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="url" type=" xs:anyURI " use="required"/>
<xs:attribute name="pitch" type=" xs:float " default="1.0"/>
<xs:attribute name="loop" type=" xs:boolean " default="false"/>
<xs:attribute name="description" type=" xs:string "/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: Avatar

Name Avatar
Type Locally-defined complex type
Nillable no
Abstract no
Documentation navigation is a whitespace-delimited list from 'ANY WALK EXAMINE FLY NONE'. For the purposes of navigation an application should do the following: (1) apply the current transform state of the enclosing hierarchy to the Viewpoint (2) apply the Viewpoint.position (3) apply the Avatar.cameraOffset (4) apply the Viewpoint.orientation. The sum of these transformations creates the final position and orientation against which all navigation (for example, due to user gestures) shall occur in the World.

speed is a multiplier factor.

cameraOffset is from center of children.

mass is in kg.

stepValue is the height of the tallest object over which the user Avatar can move (in meters). This allows (for example) staircases to be built with dimensions that can be ascended by users in WALK mode. stepValue is a non-negative float, and defaults to a value of 0.75 m.

cameraOffset default is about eye-height for an average person. If a current Avatar is set for a given user then the cameraOffset of that Avatar is added to any Viewpoint settings.

Viewpoints are not allowed in Avatar children to avoid the possibility of cyclic references.

There are four basic combinations of Avatar and Viewpoint.

No Avatar and no Viewpoint is specified in the file. In this case the initial user position in the World shall be a combination of the default Viewpoint position ('0.0 0.0 10.0') plus the default Avatar cameraOffset ('0.0 1.65 0.0'). This makes the default initial user position "0.0 1.65 10.0" and the default initial user rotation "0.0 0.0 1.0 0.0".

An Avatar but no Viewpoint is specified in the file. In this case the initial user position in the World shall be a combination of the default Viewpoint position ('0.0 0.0 10.0') plus the cameraOffset of the first Avatar found loading the file.

A Viewpoint but no Avatar is specified in the file. In this case the initial user position in the World shall be a combination of the Viewpoint position of the first Viewpoint found loading the file plus the default Avatar cameraOffset ('0.0 1.65 0.0').

Both an Avatar and a Viewpoint are specified in the file. In this case the initial user position in the World shall be a combination of the Viewpoint position of the first Viewpoint found loading the file plus the cameraOffset of the first Avatar found loading the file.

bboxSize, if present, overrides bboxSize of children.

name is required.
XML Instance Representation
<Avatar
navigation="list of: [ xs:token (value comes from list: {'ANY'|'WALK'|'EXAMINE'|'FLY'|'NONE'}) (Whitespace policy: collapse) ] [0..1] ?"
speed=" xs:float [0..1] ?"
cameraOffset=" SFVec3f [0..1]"
stepValue=" xs:float (value >= 0.0) [0..1]"
mass=" xs:float [0..1]"
bboxCenter=" SFVec3f [0..1]"
bboxSize=" SFVec3f [0..1]"
name=" xs:ID [1]">
<children> [1]
Start Choice [0..*]
<Anchor> ... </Anchor> [1]
<Billboard> ... </Billboard> [1]
<Collision> ... </Collision> [1]
<ColorInterpolator> ... </ColorInterpolator> [1]
<CoordinateInterpolator> ... </CoordinateInterpolator> [1]
<CylinderSensor> ... </CylinderSensor> [1]
<DirectionalLight> ... </DirectionalLight> [1]
<Fog> ... </Fog> [1]
<Group> ... </Group> [1]
<Inline> ... </Inline> [1]
<LOD> ... </LOD> [1]
<NormalInterpolator> ... </NormalInterpolator> [1]
<OrientationInterpolator> ... </OrientationInterpolator> [1]
<PlaneSensor> ... </PlaneSensor> [1]
<PointLight> ... </PointLight> [1]
<PositionInterpolator> ... </PositionInterpolator> [1]
<ProtoInstance> ... </ProtoInstance> [1]
<ProximitySensor> ... </ProximitySensor> [1]
<Route> ... </Route> [1]
<ScalarInterpolator> ... </ScalarInterpolator> [1]
<Script> ... </Script> [1]
<Shape> ... </Shape> [1]
<Sound> ... </Sound> [1]
<SphereSensor> ... </SphereSensor> [1]
<SpotLight> ... </SpotLight> [1]
<Switch> ... </Switch> [1]
<TimeSensor> ... </TimeSensor> [1]
<TouchSensor> ... </TouchSensor> [1]
<Transform> ... </Transform> [1]
<Use> ... </Use> [1]
<VisibilitySensor> ... </VisibilitySensor> [1]
End Choice
</children>
</Avatar>
Schema Component Representation
<xs:element name="Avatar">
<xs:complexType>
<xs:sequence>
<xs:element name="children">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element ref=" Anchor "/>
<xs:element ref=" Billboard "/>
<xs:element ref=" Collision "/>
<xs:element ref=" ColorInterpolator "/>
<xs:element ref=" CoordinateInterpolator "/>
<xs:element ref=" CylinderSensor "/>
<xs:element ref=" DirectionalLight "/>
<xs:element ref=" Fog "/>
<xs:element ref=" Group "/>
<xs:element ref=" Inline "/>
<xs:element ref=" LOD "/>
<xs:element ref=" NormalInterpolator "/>
<xs:element ref=" OrientationInterpolator "/>
<xs:element ref=" PlaneSensor "/>
<xs:element ref=" PointLight "/>
<xs:element ref=" PositionInterpolator "/>
<xs:element ref=" ProtoInstance "/>
<xs:element ref=" ProximitySensor "/>
<xs:element ref=" Route "/>
<xs:element ref=" ScalarInterpolator "/>
<xs:element ref=" Script "/>
<xs:element ref=" Shape "/>
<xs:element ref=" Sound "/>
<xs:element ref=" SphereSensor "/>
<xs:element ref=" SpotLight "/>
<xs:element ref=" Switch "/>
<xs:element ref=" TimeSensor "/>
<xs:element ref=" TouchSensor "/>
<xs:element ref=" Transform "/>
<xs:element ref=" Use "/>
<-- "Viewpoint" nodes not allowed -->
<xs:element ref=" VisibilitySensor "/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="navigation" default="ANY">
<xs:simpleType>
<xs:list>
<xs:simpleType>
<xs:restriction base=" xs:token ">
<xs:whiteSpace value="collapse"/>
<xs:enumeration value="ANY"/>
<xs:enumeration value="WALK"/>
<xs:enumeration value="EXAMINE"/>
<xs:enumeration value="FLY"/>
<xs:enumeration value="NONE"/>
</xs:restriction>
</xs:simpleType>
</xs:list>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="speed" type=" xs:float " default="1.0" use="optional"/>
<xs:attribute name="cameraOffset" type=" SFVec3f " default="0.0 1.65 0.0"/>
<xs:attribute name="stepValue" default="0.75">
<xs:simpleType>
<xs:restriction base=" xs:float ">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="mass" type=" xs:float " default="0.0"/>
<xs:attribute name="bboxCenter" type=" SFVec3f " default="0.0 0.0 0.0"/>
<xs:attribute name="bboxSize" type=" SFVec3f " default="1.0 2.0 0.5"/>
<xs:attribute name="name" type=" xs:ID " use="required"/>
</xs:complexType>
</xs:element>
top

Element: Background

Name Background
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Background node is used to specify a color backdrop that simulates ground and sky, as well as a background texture, or panorama, that is placed behind all geometry in the scene and in front of the ground and sky. Background nodes are specified in the local coordinate system and are affected by the accumulated rotation of their ancestors as described below. The backdrop is conceptually a partial sphere (the ground) enclosed inside of a full sphere (the sky) in the local coordinate system with the viewer placed at the center of the spheres. Both spheres have infinite radius and each is painted with concentric circles of interpolated color perpendicular to the local Y-axis of the sphere. The Background node is subject to the accumulated rotations of its ancestors' transformations. Scaling and translation transformations are ignored. The sky sphere is always slightly farther away from the viewer than the ground partial sphere causing the ground to appear in front of the sky where they overlap.

The skyColor field specifies the color of the sky at various angles on the sky sphere. The first value of the skyColor field specifies the color of the sky at 0.0 radians representing the zenith (i.e., straight up from the viewer). The skyAngle field specifies the angles from the zenith in which concentric circles of color appear. The zenith of the sphere is implicitly defined to be 0.0 radians, the natural horizon is at PI/2 radians, and the nadir (i.e., straight down from the viewer) is at PI radians. skyAngle is restricted to non-decreasing values in the range [0.0, PI]. There shall be one more skyColor value than there are skyAngle values. The first color value is the color at the zenith, which is not specified in the skyAngle field. If the last skyAngle is less than PI, then the color band between the last skyAngle and the nadir is clamped to the last skyColor. The sky color is linearly interpolated between the specified skyColor values.

The groundColor field specifies the color of the ground at the various angles on the ground partial sphere. The first value of the groundColor field specifies the color of the ground at 0.0 radians representing the nadir (i.e., straight down from the user). The groundAngle field specifies the angles from the nadir that the concentric circles of color appear. The nadir of the sphere is implicitly defined at 0.0 radians. groundAngle is restricted to non-decreasing values in the range [0.0, PI/2]. There shall be one more groundColor value than there are groundAngle values. The first color value is for the nadir which is not specified in the groundAngle field. If the last groundAngle is less than PI/2, the region between the last groundAngle and the equator is non-existant. The ground color is linearly interpolated between the specified groundColor values.

The backUrl, bottomUrl, frontUrl, leftUrl, rightUrl, and topUrl fields specify a set of images that define a background panorama between the ground/sky backdrop and the scene's geometry. The panorama consists of six images, each of which is mapped onto a face of an infinitely large cube contained within the backdrop spheres and centred in the local coordinate system. The images are applied individually to each face of the cube. On the front, back, right, and left faces of the cube, when viewed from the origin looking down the negative Z-axis with the Y-axis as the view up direction, each image is mapped onto the corresponding face with the same orientation as if the image were displayed normally in 2D (backUrl to back face, frontUrl to front face, leftUrl to left face, and rightUrl to right face). On the top face of the cube, when viewed from the origin looking along the +Y-axis with the +Z-axis as the view up direction, the topUrl image is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box, when viewed from the origin along the negative Y-axis with the negative Z-axis as the view up direction, the bottomUrl image is mapped onto the face with the same orientation as if the image were displayed normally in 2D.

Alpha values in the panorama images (i.e., two or four component images) specify that the panorama is semi-transparent or transparent in regions, allowing the groundColor and skyColor to be visible.

Often, the bottomUrl and topUrl images will not be specified, to allow sky and ground to show. The other four images may depict surrounding mountains or other distant scenery. Applications shall support the PNG and JPEG image file formats. Support for other image formats (e.g., GIF) that can be rendered into a 2D image is recommended (including transparency).

Ground colors, sky colors, and panoramic images do not translate with respect to the viewer, though they do rotate with respect to the viewer. That is, the viewer can never get any closer to the background but can turn to examine all sides of the panorama cube, and the viewer can look up and down to see the concentric rings of ground and sky (if visible).

Background nodes are not affected by Fog nodes. Therefore, if a Background node is present while a Fog node is active, then the Background node will be displayed with no fogging effects. It is the author's responsibility to set the Background values to match the Fog values (e.g., ground colors fade to fog color with distance and panorama images tinted with fog color). Background nodes are not affected by light sources.

Default skyColor is black (0.0 0.0 0.0).
XML Instance Representation
<Background
name=" xs:ID [0..1]"
backUrl=" xs:anyURI [0..1]"
frontUrl=" xs:anyURI [0..1]"
bottomUrl=" xs:anyURI [0..1]"
topUrl=" xs:anyURI [0..1]"
leftUrl=" xs:anyURI [0..1]"
rightUrl=" xs:anyURI [0..1]"
rotation=" SFRotation [0..1]">
<groundAngle> MFFloat </groundAngle> [0..1]
<groundColor> MFColor </groundColor> [0..1]
<skyAngle> MFFloat </skyAngle> [0..1]
<skyColor> MFColor </skyColor> [0..1]
</Background>
Schema Component Representation
<xs:element name="Background">
<xs:complexType>
<xs:sequence>
<xs:element name="groundAngle" type=" MFFloat " maxOccurs="1" minOccurs="0"/>
<xs:element name="groundColor" type=" MFColor " maxOccurs="1" minOccurs="0"/>
<xs:element name="skyAngle" type=" MFFloat " maxOccurs="1" minOccurs="0"/>
<xs:element name="skyColor" type=" MFColor " maxOccurs="1" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type=" xs:ID "/>
<xs:attribute name="backUrl" type=" xs:anyURI "/>
<xs:attribute name="frontUrl" type=" xs:anyURI "/>
<xs:attribute name="bottomUrl" type=" xs:anyURI "/>
<xs:attribute name="topUrl" type=" xs:anyURI "/>
<xs:attribute name="leftUrl" type=" xs:anyURI "/>
<xs:attribute name="rightUrl" type=" xs:anyURI "/>
<xs:attribute name="rotation" type=" SFRotation " default="0.0 0.0 1.0 0.0"/>
</xs:complexType>
</xs:element>
top

Element: Billboard

Name Billboard
Type Locally-defined complex type
Nillable no
Abstract no
Documentation children required.

The Billboard node is a grouping node which modifies its coordinate system so that the Billboard node's local Z-axis turns to point at the viewer. The Billboard node has children which may be other children nodes.

The axisOfRotation field specifies which axis to use to perform the rotation. This axis is defined in the local coordinate system.

When the axisOfRotation field is not (0, 0, 0), the following steps describe how to rotate the billboard to face the viewer:

1. Compute the vector from the Billboard node's origin to the viewer's position. This vector is called the billboard-to-viewer vector.

2. Compute the plane defined by the axisOfRotation and the billboard-to-viewer vector.

3. Rotate the local Z-axis of the billboard into the plane from b., pivoting around the axisOfRotation.

When the axisOfRotation field is set to (0, 0, 0), the special case of viewer-alignment is indicated. In this case, the object rotates to keep the billboard's local Y-axis parallel with the Y-axis of the viewer. This special case is distinguished by setting the axisOfRotation to (0, 0, 0). The following steps describe how to align the billboard's Y-axis to the Y-axis of the viewer:

4. Compute the billboard-to-viewer vector.

5. Rotate the Z-axis of the billboard to be collinear with the billboard-to-viewer vector and pointing towards the viewer's position.

6. Rotate the Y-axis of the billboard to be parallel and oriented in the same direction as the Y-axis of the viewer.

If the axisOfRotation and the billboard-to-viewer line are coincident, the plane cannot be established and the resulting rotation of the billboard is undefined. For example, if the axisOfRotation is set to (0,1,0) (Y-axis) and the viewer flies over the billboard and peers directly down the Y-axis, the results are undefined.

Multiple instances of Billboard nodes operate as expected: each instance rotates in its unique coordinate system to face the viewer.

The bboxCenter and bboxSize fields specify a bounding box that encloses the Billboard node's children. This is a hint that may be used for optimization purposes. The results are undefined if the specified bounding box is smaller than the actual bounding box of the children at any time. A default bboxSize value implies that the bounding box is not specified and if needed shall be calculated by the application.
XML Instance Representation
<Billboard
axisOfRotation=" SFVec3f [0..1]"
bboxCenter=" SFVec3f [0..1]"
bboxSize=" SFVec3f [0..1]"
name=" xs:ID [0..1]">
<children> groupingAndChildrenNodes </children> [1]
</Billboard>
Schema Component Representation
<xs:element name="Billboard">
<xs:complexType>
<xs:sequence>
<xs:element name="children" type=" groupingAndChildrenNodes "/>
</xs:sequence>
<xs:attribute name="axisOfRotation" type=" SFVec3f " default="0.0 1.0 0.0"/>
<xs:attribute name="bboxCenter" type=" SFVec3f " default="0.0 0.0 0.0"/>
<xs:attribute name="bboxSize" type=" SFVec3f " default="-1.0 -1.0 -1.0"/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: Box

Name Box
Type Locally-defined complex type
Nillable no
Abstract no
Documentation The Box node specifies a rectangular parallelepiped box centred at (0, 0, 0) in the local coordinate system and aligned with the local coordinate axes. By default, the box measures 2 units in each dimension, from -1 to +1. The size field specifies the extents of the box along the X-, Y-, and Z-axes respectively and each component value shall be greater than zero.

Textures are applied individually to each face of the box. On the front (+Z), back (-Z), right (+X), and left (-X) faces of the box, when viewed from the outside with the +Y-axis up, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D. On the top face of the box (+Y), when viewed from above and looking down the Y-axis toward the origin with the -Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box (-Y), when viewed from below looking up the Y-axis toward the origin with the +Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D.

The Box node's geometry defaults to outside faces only. When viewed from the inside, no faces are visible if the solid attribute is true (the default). When solid is false, both sides of the faces are drawn.

Box

Figure 01: Illustration of the Box node

XML Instance Representation
<Box
size=" SFVec3f [0..1]"
solid=" xs:boolean [0..1]"
name=" xs:ID [0..1]"/>
Schema Component Representation
<xs:element name="Box">
<xs:complexType>
<xs:attribute name="size" type=" SFVec3f " default="2.0 2.0 2.0"/>
<xs:attribute name="solid" type=" xs:boolean " default="true"/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: Collision

Name Collision
Type Locally-defined complex type
Nillable no
Abstract no
Documentation children required.

The Collision node is a grouping node that specifies the collision detection properties for its children (and their descendants), specifies surrogate objects that replace its children during collision detection, and sends events signalling that a collision has occurred between the avatar and the Collision node's geometry or surrogate. By default, all geometric nodes in the scene are collidable with the viewer except IndexedLineSet, PointSet, and Text. Viewers shall detect geometric collisions between the avatar and the scene's geometry and prevent the avatar from 'entering' the geometry.

If there are no Collision nodes specified in an xVRML file, then viewers shall detect collisions between the avatar and all objects during navigation.

The Collision node's collide attribute enables and disables collision detection. If collide is set to false, then the children and all descendants of the Collision node shall not be checked for collision, even though they are drawn. This includes any descendent Collision nodes that have collide set to true (i.e., setting collide to false turns collision off for every node below it).

Collision nodes with collide set to TRUE detect the nearest collision with their descendent geometry (or proxies). When the nearest collision is detected, the collided Collision node sends the time of the collision through a collide-time event. If a Collision node contains a child, descendant, or proxy (see below) then that is a Collision node and both Collision nodes detect that a collision has occurred, both send a collide-time event at the same time. A collide-time event shall be generated if the avatar is colliding with collidable geometry when the Collision node is read from an xVRML file or inserted into the transformation hierarchy.

The bboxCenter and bboxSize attributes specify a bounding box that encloses the Collision node's children. This is a hint that may be used for optimization purposes. The results are undefined if the specified bounding box is smaller than the actual bounding box of the children at any time. A default bboxSize value, (-1, -1, -1), implies that the bounding box is not specified and if needed shall be calculated by the browser.

The collision proxy, defined in the proxy element, is any legal groupingAndChildrenNodes node that is used as a substitute for the Collision node's children during collision detection. The proxy is used strictly for collision detection; it is not drawn.

If the value of the collide field is true and the proxy element is non-null, the proxy element defines the scene on which collision detection is performed. If the proxy is not present, then collision detection is performed against the children of the Collision node.

If proxy is specified, any descendent children of the Collision node are ignored during collision detection. If children is empty, collide is true, and proxy is specified, collision detection is performed against the proxy but nothing is displayed. In this manner, invisible collision objects may be supported.

The collide-time event specifies the time when the avatar makes contact with the collidable children or proxy of the Collision node. An ideal implementation computes the exact time of collision. Implementations may approximate the ideal by sampling the positions of collidable objects and the user.
XML Instance Representation
<Collision
collide=" xs:boolean [0..1]"
bboxCenter=" SFVec3f [0..1]"
bboxSize=" SFVec3f [0..1]"
name=" xs:ID [0..1]">
<children> groupingAndChildrenNodes </children> [1]
<proxy> groupingAndChildrenNodes </proxy> [0..1]
</Collision>
Schema Component Representation
<xs:element name="Collision">
<xs:complexType>
<xs:sequence>
<xs:element name="children" type=" groupingAndChildrenNodes "/>
<xs:element name="proxy" type=" groupingAndChildrenNodes " maxOccurs="1" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="collide" type=" xs:boolean " default="true"/>
<xs:attribute name="bboxCenter" type=" SFVec3f " default="0.0 0.0 0.0"/>
<xs:attribute name="bboxSize" type=" SFVec3f " default="-1.0 -1.0 -1.0"/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: ColorInterpolator

Name ColorInterpolator
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Matched pairs key and keyValue required.

This node interpolates among a list of MFColor key values to produce an SFColor (RGBA) value-changed event. The number of colors in the keyValue element shall be equal to the number of keyframes in the key element. The keyValue element and value-changed events are defined in RGBA color space. A linear interpolation using the values of the set-fraction message associated with the generated event as input is performed in HSV space. The results are undefined when interpolating between two consecutive keys with complementary hues.
XML Instance Representation
<ColorInterpolator
name=" xs:ID [0..1]">
<key> MFFloat </key> [1]
<keyValue> MFColor </keyValue> [1]
</ColorInterpolator>
Schema Component Representation
<xs:element name="ColorInterpolator">
<xs:complexType>
<xs:sequence>
<xs:element name="key" type=" MFFloat "/>
<xs:element name="keyValue" type=" MFColor "/>
</xs:sequence>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: Cone

Name Cone
Type Locally-defined complex type
Nillable no
Abstract no
Documentation The Cone node specifies a cone which is centred in the local coordinate system and whose central axis is aligned with the local Y-axis. The bottomRadius attribute specifies the radius of the cone's base, and the height attribute specifies the height of the cone from the center of the base to the apex. By default, the cone has a radius of 1.0 at the bottom and a height of 2.0, with its apex at y = height/2 and its bottom at y = -height/2. Both bottomRadius and height shall be greater than zero. http://www.xvrml.net/images/cone.png illustrates the Cone node.

The side attribute specifies whether sides of the cone are created and the bottom attribute specifies whether the bottom cap of the cone is created. A value of true specifies that this part of the cone exists, while a value of false specifies that this part does not exist (not rendered or eligible for collision or sensor intersection tests).

When a texture is applied to the sides of the cone, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back in the X=0 plane, from the apex (0, height/2, 0) to the point (0, -height/2, -bottomRadius). For the bottom cap, a circle is cut out of the texture square centred at (0, -height/2, 0) with dimensions (2 × bottomRadius) by (2 × bottomRadius). The bottom cap texture appears right side up when the top of the cone is rotated towards the -Z-axis. Transformations in the Texture node attributes affect the texture coordinates of the Cone.

The Cone geometry defaults to outside faces only. When viewed from the inside, no faces are visible if the solid attribute is true (the default). When solid is false, both sides of the faces are drawn.

cone

Figure 02: Illustration of the Cone node

XML Instance Representation
<Cone
bottomRadius=" xs:float [0..1]"
height=" xs:float [0..1]"
side=" xs:boolean [0..1]"
bottom=" xs:boolean [0..1]"
solid=" xs:boolean [0..1]"
name=" xs:ID [0..1]"/>
Schema Component Representation
<xs:element name="Cone">
<xs:complexType>
<xs:attribute name="bottomRadius" type=" xs:float " default="1.0"/>
<xs:attribute name="height" type=" xs:float " default="2.0"/>
<xs:attribute name="side" type=" xs:boolean " default="true"/>
<xs:attribute name="bottom" type=" xs:boolean " default="true"/>
<xs:attribute name="solid" type=" xs:boolean " default="true"/>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: CoordinateInterpolator

Name CoordinateInterpolator
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Matched pairs key and keyValue required.

This node linearly interpolates among a list of MFVec3f values. The number of coordinates in the keyValue element shall be an integer multiple of the number of keyframes in the key element. That integer multiple defines how many coordinates will be contained in the value-changed events.
XML Instance Representation
<CoordinateInterpolator
name=" xs:ID [0..1]">
<key> MFFloat </key> [1]
<keyValue> MFVec3f </keyValue> [1]
</CoordinateInterpolator>
Schema Component Representation
<xs:element name="CoordinateInterpolator">
<xs:complexType>
<xs:sequence>
<xs:element name="key" type=" MFFloat "/>
<xs:element name="keyValue" type=" MFVec3f "/>
</xs:sequence>
<xs:attribute name="name" type=" xs:ID "/>
</xs:complexType>
</xs:element>
top

Element: Cylinder

Name Cylinder
Type Locally-defined complex type
Nillable no
Abstract no
Documentation The Cylinder node specifies a capped cylinder centered at (0,0,0) in the local coordinate system and with a central axis oriented along the local Y-axis. By default, the cylinder is sized at "-1" to "+1" in all three dimensions. The radius attribute specifies the radius of the cylinder an