[X3D-Public] Comment on ISO/IEC IS 19775-1:2013 - DEF/USE

Roy Walmsley roy.walmsley at ntlworld.com
Mon Dec 29 05:31:44 PST 2014


Hello all.


This, my first posting here, is a comment on the DEF/USE syntax within the
X3D specification. It is about the terminology used.


Paragraph 3.1.38 defines an 'instance' as a node created by the
instantiation process. So, consider the case where a node is first
instantiated with a DEF statement. This is an instance of the node. Now
assume that other nodes are specified with a USE statement to the above
DEF'd node. Paragraph 4.4.3 clearly states that the node is not to be
copied. Instead it is inserted multiple times into the scene graph.
Therefore, there is clearly only one 'instance'.


Now four other paragraphs (22.4.1, 22.4.2, 22.4.3 and 23.4.1) all use the
expression 'multiple instances' when referring to DEF/USE semantics. This is
clearly incorrect. The one instance is merely 'referenced' multiple times.


The three sensor nodes referred to above are all quoted as using the union
of their boxes. All three nodes have 'centre' and 'size' fields that define
the box within which to sense. All three are affected by the hierarchical
transformations of their parents.


For each of the references to a given node (assuming that no other parts of
the scene graph modify the 'size' and 'centre' fields during the traversal)
the size and location of the box, in the local coordinate system, will be
unchanged.


Now, consider the process of traversing a scene graph with DEF/USE nodes.
The instance of the node (with the DEF) will be traversed first. The
parental transformations will be applied to the box to convert the
coordinates to world coordinates (or this could be considered in reverse
whereby the world coordinates are converted to the local coordinates) and
perform the appropriate sensing. When the next reference is encountered
(i.e. the first USE) the same instance will be traversed again. However, it
is likely to have different parental transformations and so result in a box
in a different location and perhaps with a different size. Similarly for any
further USE reference.


So each traverse of the one instance is handled in an identical manner,
generating events as appropriate. To say that they use the union is
technically incorrect. The union is never generated. To the viewer of the
rendered scene it might appear to be a union. But it is not so. Events are
not based on a union. They are based on multiple traverses through the one
instance.


Now, consider the case where multiple references have the same parental
transformations. The box size and locations will be identical in each case.
Each traverse will generate the same events cycle, resulting in multiple
identical events from the same instance, being sent along the same routes,
except for one point. The isActive state will be set / cleared by the first
traverse through the DEF'd node. Subsequent traverses through any USE node
will therefore not generate any new events (assuming that the viewer has not
altered position during the interval between the traverses).


The specification refers to the results being undefined for overlapping
bounding boxes. Yet we can see that the results are predictable on the basis
of multiple traverses, albeit that there is no simple rule defining what the
results are. They will vary on a case by case basis, being dependent on the
viewer position relative to each of the multiple references and the isActive
status at the start of the scene graph traversal.


Roy Walmsley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20141229/b71dcff7/attachment.html>


More information about the X3D-Public mailing list