Grouping Nodes Anchor
Test Cases
Grouping Nodes Anchor
- An Anchor node must support at
least 500 children
- An Anchor node is defined with 500 child nodes.
All child nodes are themselves Transforms with
Shape nodes. Section 7.3 (Minimum Support
Requirements) of the VRML specifications states
that a browser conforming to the base profile
shall support at least 500 children within a
grouping node. The test should generate 500
spheres of radius 0.3 with default color.
- Single child associated with single
URL.
- An Anchor with a Shape node (Sphere geometry) in
the children field is defined in the local
coordinate system. This geometry is associated
with a single URL refrerence in the url field.
The referenced file is "test-anchorclick.wrl"
that should generate a red box (and some text on
top of it) as the final result when the user
clicks on the red sphere. No viewpoints are
associated with the url field.
- Link to VRML file with viewpoint
- An Anchor node with a Shape node (Box Geometry)
as child is defined in the local coordinate
system. The url field is set to reference a VRML
file residing in the same directory. The test
should generate the text "Please click here
to see a red box and and a red cone with a bound
viewpoint". After clicking on the text, the
test should generate a red box and red cone with
some text on top of it.
- Multiple children associated with
same url
- An Anchor node with three children (sphere
geometries) is defined in the local coordinate
system. The url field is set to reference a VRML
file residing in the same directory. The test
should generate three red spheres with some text
on top of it. Clicking on any sphere should cause
the browser to bring up the same file that
generates a blue box and some text on top of it.
- Multiple nested Anchor nodes
- An Anchor node with three Anchor children is
defined in the local coordinate system. Each
Anchor child references a different url. The test
should generate a different geometry depending on
which sphere was clicked when the test was
originally started. Clicking on the first sphere
should generate blue box, clicking on the second
should generate a blue cone and clicking on the
third should generate a blue cylinder.
- Link with viewpoint only
- An Anchor node with a Shape node (Text geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference a VRML file residing on the same
directory. The test should generate the text
"Please click here to change the viewpoint
of this text to 0 0 25". After clicking on
the text, the test should redefine the viewpoint
to 0 0 25.
- Reference to invalid viewpoint
- An Anchor node with a Shape node (sphere geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference a non-existing viewpoint name. The
test should generate the text "WHEN YOU
CLICK ON THE SPHERE BELOW NOTHING SHOULD HAPPEN"
and a red sphere below it. After clicking on the
sphere, the test should do nothing as the
viewpoint name does not exist. This is valid
behaviour.
- Anchor node referencing another
Anchor node
- An Anchor node with a Shape node (sphere geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference another Anchor node in its "url"
field, this file is in turn another Anchor node.
The test should first generate a red sphere with
some text on top of it. After clicking on the
sphere the test should generate a red box with
some text on top of it. After clicking on the red
box, the test should generate a blue box with
some text on top of it.
- Anchor node referencing an invalid
url (url preference)
- An Anchor node with a Shape node (sphere geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference two files, the first one does not
exist, however the second one does. After
clicking on the sphere, the test should examine
the first item in the url field and since the
file does not exist, it should be ignored and the
second one should be used instead. If the correct
file is accessed the test should generate a blue
box with some text on top of it.
- Test absolutes url's
- An Anchor node with a Shape node (sphere geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference a file with an absolute path name.
After clicking on the sphere, the browser should
bring up the file "http://autumn.ncsl.nist.gov/vts/Grouping_nodes/
Transform/ref-absolute.wrl", that in turn
should generate a blue box with some text on top
of it.
- Test relative url's
- An Anchor node with a Shape node (sphere geometry)
in the "children" field is defined in
the local coordinate system. The url field is set
to reference a file with a relative path name.
After clicking on the sphere, the browser should
bring up the file "../../test_urls/test-anchor.wrl",
that in turn should generate a red box with some
text on top of it.
Tests beyond minimumum
conformance requirements: bboxCenter and bboxSize
- Test if browser can parse bboxSize
and bboxCenter fields.
- An Anchor node with a Shape node (IndexedFaceSet
geometry) as a child is defined in the local
coordinate system. A bboxSize of 2 2 2 and a
bboxCenter of 0 0 0 is given to the Anchor node.
The browser should parse the Anchor node without
error and display the IndexedFaceSet geometry
with the VTS logo mapped to the front.
If you have comments or suggestions, email me at mbrady@nist.gov