[x3d-public] NIST conformance example behaviour

Leonard Daly Leonard.Daly at realism.com
Wed Jan 25 18:48:11 PST 2017


It is important to note that when a DEFed node is USEd, it does not 
create another copy (or instance) of the original, but has a reference 
to the original node. From 4.4.3 
(http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics) 
"The USE statement does not create a copy of the node. Instead, the same 
node is inserted into the scene graph a second time, resulting in the 
node having multiple parents".

Joe's comment about directOutput being outside the event cascade is 
wrong. See 
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/scripting.html#Script. 
"... the script may also send events directly to any node to which it 
has access". A Script with directOutput=TRUE sends events. It can read 
the most recent value of any field of a node which it has direct access 
(29.2.6].

Since fields can only be updated at the end of the cascade (otherwise an 
event in the cascade would have the same timestamp as other events, but 
potentially different values), direct access from a Script to a node 
happens like regular events; just without the ROUTE.

Leonard Daly



> Hello Don,
>
>> "A Script node with a field containing a USE reference to a bindable node has the ability to bind a node directly by changing the value of the bind field.  Setting the bind value is equivalent to receiving a set_bind event.“
> Sorry, I did not want to resume that nitpicking discussion, but you are taking the wrong direction :-(
>
> My point is:
>
> 1. There is this sentence in section 7.2.2 of the specification: „The results are undefined if a multiply instanced (DEF/USE) bindable node is bound.“
>
> 2. In the NIST example we exactly do have that case - a bindable node (DEF nav1 NavigationInfo) that is multiply instanced - once as a child of the (implicit) root Group node, and once as a child of the Script node.
>
> 3. => According to the specification, the example is undefined. Q.E.D.
>
> I do not claim that there *actually* is a problem with the NIST example, I just say that *formally* the example is invalid because of that sentence in section 7.2.2 of the specification.
>
> So what is the rationale behind that sentence? That is explained in the Annotated VRML97 Reference. The browser needs to determine the transformation of the currently bound Viewpoint, Background or Fog node. The NavigationInfo node actually is a special case, because for that node the transformation of the currently bound Viewpoint is taken. Now, when you DEF/USE a bindable node (or any group node above a bindable node), you have to take care that you do not add the bindable node more than once to the transformation hierarchy, because otherwise the browser cannot decide which of the transformations to take. Adding a bindable node to the Script node does *not* add it to the transformation hierarchy (see section 4.3.5 of the specification) - that is why there is no problem in the NIST example.
>
> So, what to do with that awkward sentence in section 7.2.2? My recommendation would be to replace it with a sentences like this: „A bindable node may only be bound when it is part of the transformation hierarchy exactly once, otherwise the result is undefined.“ But I’m sure a native english speaker can word that much better.
>
> Bye,
>
> Patrick
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org


-- 
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170125/0aa5e6c3/attachment.html>


More information about the x3d-public mailing list