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

Michalis Kamburelis michalis.kambi at gmail.com
Sat Sep 16 08:13:11 PDT 2017


2017-09-16 1:34 GMT+02:00 Andreas Plesch <andreasplesch at gmail.com>:
> This is pretty standard x3d except for use of the x3dom 'render' SFBool
> field which can be used to control rendering of a shape node. Is there a
> standard conforming way to use a SFBool event to control rendering ?
> 'render' is certainly convenient.

The standard way to use SFBool to control rendering:

- use 1 BooleanFilter, and connect it's inputFalse and inputTrue to 2
different IntegerTrigger nodes,
- each IntegerTrigger generates different integer value (they ignore
their input boolean value),
- both IntegerTrigger nodes connect to a single Switch.whichChoice.

A working example in the attachment, tested on view3dscene, in classic
and XML encoding for convenience.

Caveats:

- This switches not only visibility, but also collisions of your
object, unlike the "render" field. You have to use Collision node if
you want to tweak it.
- It uses the BooleanFilter node, which is the very node you're trying
to test :)

I agree that "render" is useful, that's why view3dscene also
implements it :)
https://castle-engine.sourceforge.io/x3d_implementation_shape_extensions.php

Regards,
Michalis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change_visibility.x3d
Type: model/x3d+xml
Size: 1735 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170916/5f4703b4/attachment-0001.x3d>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change_visibility.x3dv
Type: model/x3d+vrml
Size: 1314 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170916/5f4703b4/attachment-0001.x3dv>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change_visibility_0.jpg
Type: image/jpeg
Size: 70127 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170916/5f4703b4/attachment-0001.jpg>


More information about the x3d-public mailing list