<div dir="ltr"><div>I agree, inputFalse should produce false since BooleanFilter is designed as a pass through filter. It is just a matter of the spec. language being a bit too concise.<br></div><div>'<span style="color:rgb(0,0,0);font-size:12.8px">based on the Boolean value received' mostly refers to which of the possible output event should be generated, inputTrue or inputFalse. But the phrase is ambiguous with regards to the associated values.</span></div><div><span style="color:rgb(0,0,0);font-size:12.8px"><br></span></div><div><font color="#000000"><span style="font-size:12.8px">What about</span></font></div><div><font color="#000000"><span style="font-size:12.8px"><br></span></font></div><div><span style="color:rgb(0,0,0);font-size:12.8px">'When the set_boolean event is received, the BooleanFilter node generates two events: either inputTrue with a value of true or inputFalse with a value of false, depending on the Boolean value received;...' ?</span><font color="#000000"><span style="font-size:12.8px"><br></span></font></div><div><span style="color:rgb(0,0,0);font-size:12.8px"><br></span></div><div><div>But since the question was raised, let's explore the design to see if is possible to decide which behaviour may be more useful. How may BooleanFilter be used ?</div><div>Sensors are probably the main sources of boolean outputs. Filtering a sensor output makes it possible to selectively choose separate responses to the output. It is a kind of branching. This branching is achieved by having either inputTrue or inputFalse events but is independent of their values.</div></div><div>Considering a 'false' output value as something positive (true) may often be appropriate but completely depends on the scene architecture. So I follow Don's reasoning that it is best to keep it simple by forwarding the input values.</div><div><br></div><div>-Andreas</div><div><span style="color:rgb(0,0,0);font-size:12.8px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 4, 2017 at 12:39 AM, Don Brutzman <span dir="ltr"><<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">great question, thanks Andreas. let's explore.<br>
<br>
On 9/3/2017 8:18 PM, Andreas Plesch wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Looking at BooleanFilter (<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#BooleanFilter" rel="noreferrer" target="_blank">http://www.web3d.org/document<wbr>s/specifications/19775-1/V3.3/<wbr>Part01/components/utils.html#B<wbr>ooleanFilter</a>) I could not decide what the boolean output values for the inputTrue and inputFalse events were.<br>
<br>
The spec. just has:<br>
<br>
'BooleanFilter node generates two events: either inputTrue or inputFalse, based on the Boolean value received; ...'<br>
</blockquote>
<br>
full prose:<br>
<br>
"BooleanFilter filters Boolean events, allowing for selective routing of TRUE or FALSE values and negation.<br>
<br>
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."<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Especially, the value for inputFalse is difficult to determine. I actually was leaning towards the value true for inputFalse when the received value is false since it is then true that the input value was false.<br>
</blockquote>
<br>
yes the semantics of the spec phrasing is a bit ambiguous. we should get more explicit.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, the tooltips here<br>
<br>
<a href="http://www.web3d.org/x3d/content/X3dTooltips.html#BooleanFilter" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/X3dTooltips.html#BooleanFil<wbr>ter</a><br>
<br>
claim that the inputFalse value should be false instead, passing on the value of the input.<br>
</blockquote>
<br>
reviewing now, i think that is correct, since it is closely following the initial spec sentence clause "based on the Boolean value received".<br>
<br>
of additional note is the figure that was reviewed by a number of people, linked in tooltips:<br>
<br>
Hint: X3D Event-Utility Nodes, Field Event Diagrams<br>
<a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf" rel="noreferrer" target="_blank">http://x3dgraphics.com/example<wbr>s/X3dForWebAuthors/Chapter09-E<wbr>ventUtilitiesScripting/X3dEven<wbr>tUtilityNodeEventDiagrams.pdf</a><br>
<br>
attached is image excerpt showing BooleanFilter inputs/outputs, plus copy of diagram for convenience.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is that really what other x3d browsers do ?<br>
</blockquote>
<br>
yes it is good to check. perhaps a more explicit test scene will help also.<br>
<br>
I think that [inputFalse passing FALSE] is indeed the right approach, for a few reasons:<br>
<br>
a. the node name BooleanFilter indicates a filtering action, i.e. only passing some things through, rather than changing them<br>
<br>
b. if an author filters an event stream to detect a FALSE event, it is detected and usable as such, rather than requiring yet-another negation.<br>
<br>
c. precise logic like this leads to more succinct and less error-prone event chains.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Checking cobweb it appears that it rather uses inputFalse=true here:<br>
<br>
<a href="https://github.com/create3000/cobweb/blob/master/src/cobweb/Components/EventUtilities/BooleanFilter.js#L110" rel="noreferrer" target="_blank">https://github.com/create3000/<wbr>cobweb/blob/master/src/cobweb/<wbr>Components/EventUtilities/Bool<wbr>eanFilter.js#L110</a><br>
</blockquote>
<br>
good check, we need to make them all consistent.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It looks like clarification is needed,<br>
</blockquote>
<br>
yes, further comment welcome. once we're clear, let's<br>
<br>
d. have an explicit test scene,<br>
e. have specific spec prose and perhap add the diagrams,<br>
f. add an inputFalse Warning to ensure no ambiguity remains.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-Andreas<br>
</blockquote>
<br>
thanks!<br>
<br>
all the best, Don<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA <a href="tel:%2B1.831.656.2149" value="+18316562149" target="_blank">+1.831.656.2149</a><br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andreas Plesch<br>Waltham, MA 02453</div>
</div></div>