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

Don Brutzman brutzman at nps.edu
Sun Jan 15 22:58:08 PST 2012

On 1/9/2012 1:03 PM, Michalis Kamburelis wrote:
> 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.

many thanks!  thanks for patience with my reply.

> 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).

looks good, i was confused.  interestingly, the spec seems slightly ambiguous:

30.4.1 BooleanFilter

"When the set_boolean event is received, the BooleanFilter node generates two events: either inputTrue or inputFalse, based on the Boolean value received; and inputNegate, which contains the negation of the value received."

> 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/

BS Contact 8 gave me the following error:

Loading scene C:\Users\brutzman\Desktop\boolean_filter.x3dv
VRML syntax error: line   2 in C:\Users\brutzman\Desktop\boolean_filter.x3dv:
(PROFILE) Expected '{'; got 'I', non standard field ? 
VRML syntax error: line   2 in C:\Users\brutzman\Desktop\boolean_filter.x3dv:
(PROFILE) Expected '{'; got 'I', non standard field ? 

seems to work fine in IR

> 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.

i guess it should be consistent too.  Spec bug submitted.

i was thinking that the receipt of a 'false' event should be ignored
as a way of keeping track of the semantic value of the event.  a common
authoring issue is the pairwise generation of true/false events when
using TouchSensor isOver or isActive.  it is more verbose to have to
use a BooleanFilter each time, and actually that is different from our
original design criteria which was to make these as simple as possible
for authors to accomplish common use cases.

the isOver/isActive true/false is a one-two punch that often leads to
severe author or user frustration, because the only way that a user
can get something done is to HOLD THE MOUSE AND NOT LET GO!!! which
is a horrible design flaw.

So I don't think that honoring 'false' events as a default behavior
is a good idea.  Such 'false' events can get special handling with
needed, but in general their semantics seem to be, well, _false_ and so
they should be ignored.

therefore i've entered a second bug (which contradicts the previous one
and the default behavior of TimeTrigger) to say that false events should
be ignored for set_boolean to IntegerTrigger and TimeTrigger.  this will
lead to simpler authoring and more reliable constructs, i believe, if
people check the issue out with commonly authored scenes.

having it as a pair of bugs will ensure we consider it properly and
collect the full rationale of pros and cons in the Mantis database.
thanks Len for administering these for working group meetings, and
hip hip hooray for Web3D Consortium being organized to support this.

> 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.

understood, i think you are correctly consistent with the spec
and look forward to further discussion to see if we can improve
this further or not.

> Regards,
> Michalis

updated .pdf attached, will upload tonight, again thanks

all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X3dEventUtilityNodeEventDiagrams.pdf
Type: application/pdf
Size: 32394 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20120115/418c29b8/attachment-0001.pdf>

More information about the X3D-Public mailing list