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

Michalis Kamburelis michalis.kambi at gmail.com
Mon Jan 16 05:27:42 PST 2012


Don Brutzman wrote:
> 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 ?

That's weird, looks like it fails at "PROFILE Interchange" line? In any 
case, this test would not work with BS Contact anyway --- it uses Logger 
node, available only in view3dscene and InstantReality as far as I know.

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

I fully agree with your reasoning. It would be often comfortable if 
TimeTrigger/IntegerTrigger ignored set_boolean=FALSE. Right now you 
sometimes (often?) have to combine BooleanFilter with 
TimeTrigger/IntegerTrigger to get the desired behavior.

However, we can't break compatibility now... It would not be nice if 
TimeTrigger/IntegerTrigger suddenly behaved differently in new X3D 
version. (Confusing for users, uncomfortable for implementors --- 
different code for the same node, depending on used X3D version? Seems 
ugly.) To solve this, I would propose adding another field to get the 
new behavior, like

TimeTrigger/IntegerTrigger {
   .... new field: ...
   SFBool [in,out] filterInput FALSE
}

When filterInput=FALSE (default), the behavior stays as it is 
(set_boolean value is ignored), so existing X3D scenes will work the 
same. When filterInput=TRUE, then only set_boolean=TRUE triggers the 
output from XxxTrigger.

> updated .pdf attached, will upload tonight, again thanks

Great, thank you! I seen some users struggling to understand the event 
utilities behavior --- this reference sheet be very helpful. I linked it 
from my engine docs on 
http://castle-engine.sourceforge.net/x3d_implementation_eventutilities.php .

Regards,
Michalis



More information about the X3D-Public mailing list