[X3D courses] [X3D-Public] X3D event utilities: quick reference sheet available

Michalis Kamburelis michalis.kambi at gmail.com
Mon Jan 9 13:04:00 PST 2012


Don Brutzman wrote:
> I've prepared a quick reference sheet for the X3D event utility nodes.
> It shows input and output events, helping to keep track how to use these
> helpful nodes.
[...]
> Comments and feedback on these diagrams are welcome.

Very nice, but I found two errors. Checked everything vs X3D 3.2 
specification, and view3dscene, and InstantReality:

1. BooleanFilter: Both "inputTrue" and "inputFalse" are identity 
functions. "inputNegate" is not equivalent to "inputFalse" at all. 
That's how it works in view3dscene, specification, and tested with 
InstantReality also (easy to test using the "Logger" node, available in 
both view3dscene and InstantReality):

- set_boolean=TRUE  => inputTrue =TRUE  and inputNegate=FALSE
- set_boolean=FALSE => inputFalse=FALSE and inputNegate=TRUE

That is, inputTrue and inputFalse generate always the same value that 
was passed to set_boolean. They only filter it, as the node name 
suggests (inputTrue is not generated at all when set_boolean=FALSE is 
received, and vice versa).

Test X3D boolean_filter.x3dv attached, available also in SVN on 
http://svn.code.sf.net/p/castle-engine/code/trunk/demo_models/event_utilities/

2. TimeTrigger and IntegerTrigger: set_boolean = FALSE is *not* ignored, 
it works the same as set_boolean = TRUE. In case of TimeTrigger, the 
specification expicitly says "The value of set_boolean shall be 
ignored." In case of IntegerTrigger, nothing is said about the meaning 
of set_boolean value, so I guess it's supposed to be ignored too, for 
consistency.

This is tested by integer_trigger.x3dv, attached (available also inside 
http://svn.code.sf.net/p/castle-engine/code/trunk/demo_models/event_utilities/ 
). If set_boolean=FALSE would be ignored, this test would fail when 
moving mouse out of the box --- IntegerTrigger with integerKey=0 would 
never fire. But it works, so set_boolean=FALSE is handled just like 
set_boolean=TRUE, both in view3dscene and InstantReality.

Regards,
Michalis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boolean_filter.x3dv
Type: model/x3d+vrml
Size: 458 bytes
Desc: not available
URL: <http://www.movesinstitute.org/pipermail/x3d-courses/attachments/20120109/9a9d9ced/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: integer_trigger.x3dv
Type: model/x3d+vrml
Size: 1081 bytes
Desc: not available
URL: <http://www.movesinstitute.org/pipermail/x3d-courses/attachments/20120109/9a9d9ced/attachment-0001.bin>


More information about the x3d-courses mailing list