Table of Contents Previous Chapter Details Viewpoint Slideshow Next Chapter Details X3D Resources

X3D Example Archives: Conformance Nist, Special Groups, Switch

X3D Scenes Descriptions
bound - 500 This tests check the boundary condition of 500 children per grouping node. A Switch node is defined with 500 children in its "switch" field. Section 7.3 (Minimum Support Requirements) of the VRML specifications 500 children within a single grouping node. The test should generate 500 default color spheres and radius 0.3 meters.
less - than - zero This tests addresses the ability of a browser to set the "whichChoice" field to a negative value. A Switch node with one single item in its "choice" field is defined and the "whichChoice" field is set to -1 (the default value), which indicates that nothing shall be selected from the "choice" field. The test shall generate a green box with some text on top of it If a red box is generated, then a failure occurred.
more - than - max This tests addresses the ability of a browser to set the "whichChoice" field to a value that is higher than the number of items in the "choice" field. A Switch node is defined with one item in its "choice" field and the "whichChoice" field is set to 1. This value is higher than the number of items in the "choice" field, therefore nothing shall be chosen at all. The test should generate a green box with some text on top of it. If a red box is generated then a failure occurred.
nested - switch Test browser to nest Switch node. A Switch node is defined with two items in its "choice" field. The second item is in turn another Switch node with one item in its "choice" field (which is selected). The outer Switch then selects the second item (the inside Switch node) in its "whichChoice" field. The test should generate a green box with some text on top of it. If a red box is generated, then a failure occurred.
select - firstchoice This test sets the "choice" field to three "Shape" node, and the "whichChoice" field to 0. Under these conditions the first choice should be chosen from the "choice" field. The test should generate a green sphere with some text on top of it. If any other geometry is generated, then a failure has occurred.
select - lastchoice This test sets the "choice" field to three "Shape" node, and the whichChoice field to 2. Under these conditions the third choice should be chosen from the "choice" field. The test should generate a green box with some text on top of it. If any other geometry is generated, then a failure has occurred.

Online at http://www.web3d.org/x3d/content/examples/ConformanceNist/SpecialGroups/Switch

Master source code archive is under subversion control at
http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/SpecialGroups/Switch

Table of Contents Previous Chapter Details Viewpoint Slideshow Next Chapter Details X3D Resources

Also available: current and archived nightly builds and distributions of these examples, all published under an Open-Source License.

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.