[x3d-public] BooleanFilter inputFalse output value true or false ?

Michalis Kamburelis michalis.kambi at gmail.com
Mon Sep 4 06:05:00 PDT 2017


2017-09-04 6:39 GMT+02:00 Don Brutzman <brutzman at nps.edu>:
>> Looking at BooleanFilter
>> (http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#BooleanFilter)
>> I could not decide what the boolean output values for the inputTrue and
>> inputFalse events were.

At least in view3dscene (Castle Game Engine), inputFalse generates false.

The exact logic is as follows (in pseudo-code):

```
when BooleanFilter receives set_boolean with value B : boolean:

  if B then
    InputTrue.Send(B)
  else
    InputFalse.Send(B);

  InputNegate.Send(not B);
```

The actual Pascal code responsible for this is in
https://github.com/castle-engine/castle-engine/blob/master/src/x3d/x3dnodes_standard_eventutilities.inc#L400
. You can look inside this file for the implementation of other X3D
nodes from the "event utilities" component. Of course this only
reflects my personal understanding of the X3D specification (only
sometimes confirmed by testing other browsers).

Regards,
Michalis



More information about the x3d-public mailing list