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

X3D Example Archives: Conformance Nist, Bindable Nodes, Viewpoint

X3D Scenes Descriptions
create vRML from string viewpoint Test that a Viewpoint genereated by CreateVrmlFromString should not be bound. A Viewpoint node is introduced into this world via the createVrmlFromString method of an EcmaScript script node. The string used in the script contains a REAR view Viewpoint node with a position of 0 0 -10. Because the Viewpoint node is introduced via a createVrmlFromString method, it should not be bound to the top of the stack. As a result, the default frontal Viewpoint values should be used by the browser, and the viewer should have a FRONT view of the cube geometry.
create vRML from url viewpoint Test that a Viewpoint genereated by CreateVrmlFromUrl should not be bound. A Viewpoint node is introduced into this world via the createVrmlFromURL containing a REAR view Viewpoint node. Because the Viewpoint node is introduced via a createVrmlFromURL method, it should not be bound to the top of the stack. As a result, the default frontal Viewpoint values should be used by the browser, and the viewer should have a FRONT view of the cube geometry.
default binding proto Test a PROTO Viewpoint. A Viewpoint node is defined inside a PROTO definition in this world. That PROTO is then instantiated in the world. The result should be: that Viewpoint should be bound to the Viewpoint stack. A RIGHT side Viewpoint node is defined inside A PROTO definition, then instantiated in the world file. As a result, the viewer should see a cubic geometry with the word RIGHT displayed on its face, and Text geometry at the bottom of the world indicating that the Viewpoint position is 10 0 0.
default binding single Test a single bound Viewpoint. A single Viewpoint node is present in this world. Because it is the first and only Viewpoint in this world, it should be bound to the top of the Viewpoint stack. As a result, the viewer should get a REAR view of a cubic geometry, with the word REAR appearing on the back face of the cube. In addition, Text at the bottom of the world should indicate the viewers position to be 0 0 -1 (behind the cube).
default binding two Test selection of first Viewpoint found. Two Viewpoint node exist in this world. By default, the first Viewpoint node found in the world will be bound to the stack. The first Viewpoint in thiw world is a RIGHT side Viewpoint. The viewer should see a cube with the word RIGHT displayed on its face. At the bottom of the world, there should be Text stating that the Viewpoint position is 10 0 0.
default viewpoint Test default Viewpoint properties. This world contains a single default (empty) Viewpoint node. As a result the default position of the Viewpoint should be at 0 0 10 (in front of the origin of the local coordinate system). Its orientation should be at 0 0 1 0 (no variation from the default orientation of looking directly down the Z axis in the negative direction). And any transition to another Viewpoint should result in a "jumpcut" (movement) to the next Viewpoint node, because the "jump" field is by default equal to true. As a result, the viewer should see a cubic geometry, with the word FRONT displayed, Text at the bottom of the world should show the position to be 0 0 10, and indicating the cube geometry with the pointing device should result in a "jumpcut" to the REAR view.
inline viewpoint Test Inline Viewpoint binding. A Viewpoint node is introduced into this world via the Inline node. Because the Viewpoint node is introduced via an Inline node, it should not be bound to the top of the stack. As a result, the default frontal Viewpoint values should be used by the browser, and the viewer should have a FRONT view of the cube geometry, and Text at the bottom of the world should indicate that the Viewpoint position is 0 0 10.
jump false Test jump equal to false. This world tests jump = false field of a Viewpoint node. Initially, a FRONT Viewpoint is bound in this world. This is indicated by a cube geometry displaying the word FRONT on its face, Text at the bottom of the world indicating that the Viewpoint position is 0 0 10, and Text at the top of the world indicating the the FRONT viewpoint is bound to the top of the stack. Passing the pointing device over the cube should NOT cause a "jumpcut" to the RIGHT Viewpoint. The word FRONT should still appear on the cube, Text at the bottom of the world should show the Viewpoint position to STILL BE 0 0 10, but Text at the top of the world should indicate that the RIGHT Viewpoint is now bound to the top of the Viewpoint stack.
jump true Test jump equal to true. This world tests jump = true field of a Viewpoint node. Initially, a FRONT Viewpoint is bound in this world. This is indicated by a cube geometry displaying the word FRONT on its face, Text at the bottom of the world indicating that the Viewpoint position is 0 0 10, and Text at the top of the world indicating the the FRONT viewpoint is bound to the top of the stack. Passing the pointing device over the cube should cause a "jumpcut" to the RIGHT Viewpoint. The word RIGHT should appear on the cube, Text at the bottom of the world should show the new Viewpoint position to be 10 0 0, and Text at the top of the world should indicate that the RIGHT Viewpoint is now bound to the top of the Viewpoint stack.
jumpcut anchor Test jumpcut transition with an Anchor node. An Anchor node, with a url field of "Top_View" (corresponding to the name of Viewpoint in this world) should create a "jump cut" transition of views when the Box geometry in this world is indicated by the pointing device. As a result, indicating the Box geometry should result in a Viewpoint transition to the top view of the Box geometry. The viewer should see a cubic geometry with the word TOP displayed.
jumpcut collision Test jumpcut transition with a Collision node. This world contains a collision node that should NOT send events during a jumpcut. The initial Viewpoint in this world is in front of a red Box geometry. A second Viewpoint exists BEHIND the red Box geometry. Indicating the Box with the pointing device should cause a "jumpcut" from the front to rear Viewpoint. During this jumcput, collision detection should be disabled. As a result, the Box geometry should remain a red color, indicating that no collision detection took place during the jumpcut. If the red Box turns yellow, then that indicates that collision detection occured during the jumpcut, and the browser fails the test.
jumpcut loadurl Test jumpcut transition with LoadUrl method. A Script node with a call to the "loadURL" method, with a url corresponding to the MFString "Top_View" (the name of a Viewpoint in this world) should create a "jump cut" transition of views when the Box geometry in this world is indicated by the pointing device. As a result, indicating the Box geometry should result in a Viewpoint transition to the top view of the Box geometry, and the viewer should see a cubic geometry with the word TOP displayed on the face of the cube.
jumpcut loadworld Test jumpcut to viewpoint in Anchor URL. This world contains an Anchor link to itself, with the Anchor containing the addition of RearView at the end of the url. When the cubic geometry is selected by the pointing device, the world reloads itself, with the initial Viewpoint now being the rear Viewpoint instead of the first encountered front Viewpoint. Because the "RearView" is specified at the end of the url in the Anchor node, the browser should disregard any other Viewpoint node in this world, and load the Viewpoint node with the DEF name "RearView" as the default Viewpoint. As a result, the viewer should see a cubic geometry with the word REAR appearing on its face, and Text at the bottom of the world should indicate the Viewpoint position to be at coordinates 0 0 -10.
jumpcut loadworld noview Test jumpcut to a non-existant viewpoint in Anchor URL.Because a Viewpoint named "NonExistantView" is specified in the url, the browser should disregard any other Viewpoint node in this world, and load the Viewpoint node with DEF name "NonExistantView" as the default Viewpoint. HOWEVER, because this Viewpoint does not exist in this world, it should default to the first found Viewpoint, DEFed as "RightView". The viewer should see a cubic geometry with the word RIGHT displayed on it face, and Text geometry should indicate that the current Viewpoint position is at 10 0 0.
jumpcut proximitysensor Test jumpcut with ProximitySensor events. The initial Viewpoint in this world is outside of a ProximitySensor cube. A Second Viewpoint node is at the center of the ProximitySensor (the origin of the local coordinate system). Indicating the Box geometry in the world creates a "jumpcut" between the first and second Viewpoint. The enterTime of the ProximitySensor should be identical to the bindTime of Viewpoint 2 (at the origin of the coordinate system). The exitTime of the ProximitySensor should equal the bindTime of Viewpoint 1 (located outside of the ProximitySensor) . As a result, Text at the bottom of the world should indicate pass/fail of the time events being equal for enterTime and exitTime.
noviewpoint Test browser state with no Viewpoint node present. No Viewpoint node is present in this world. By default, the browser should set it state to that of a default Viewpoint node, with an initial position of 0 0 10, and and initial orientation of 0 0 1 0 (no change from the initial orientation along the -Z direction, coincident with the Z axis). The viewer should be looking down the Z axis in the negative direction, and be at a distance of 10 meters from the origin.
viewinline This is a collateral file used in other tests for this node.
viewpoint This is a collateral file used in other tests for this node.

Online at http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint

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

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.