<div dir="ltr"><div dir="ltr"><p class="MsoNormal">Or rely on integerSequencer to generate integer index, and have a packed/contiguous
list:<br></p><p class="MsoNormal"><span></span></p>
<p class="MsoNormal">StringSwitch - inputOnly SFInt32 set_index, outputOnly SFString value_changed, field MFString values<span></span></p>
<p class="MsoNormal">NodeSwitch - inputOnly SFInt32 set_index, outputOnly SFNode value_changed, field
MFNode values?<span></span></p><p class="MsoNormal">Benefit, can generate more node types as needed with fewer lines of code.</p><p class="MsoNormal">Or could combine into one giant FieldChoice node with fields MFNode node_values, MFString string_values, MFDouble, MFFloat, MFTime, MFImage, MFMatrix3f ...</p><p class="MsoNormal">and outputOnly node_changed, string_changed, double_changed, float_changed, time_changed, image_changed, matrix3f_changed output fields,</p><p class="MsoNormal">and when set_index, it outputs any SF that are within the corresponding MF range?</p><p class="MsoNormal">Benefit: only one new node needed.</p><p class="MsoNormal">-Doug</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 10, 2023 at 11:36 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">We can do this with SAI by adding and removing routes. But the question is, can we do it declaratively, without script?</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 11, 2023 at 12:23 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Say I want to take a [0,1] fraction key and map it to an MFString keyValue. How do I do that in X3D?<div dir="auto"><br></div><div dir="auto">This might be used for alternating Text nodes, or ROUTEs (as nodes), see below.</div><div dir="auto"><br></div><div dir="auto">Also, can I take a similar key fraction and map to keyValue MFNodes?</div><div dir="auto"><br></div><div dir="auto">I realize that Switch plus and ScalarInterpolator would satisfy the latter.</div><div dir="auto"><br></div><div dir="auto">I’m not clear on how to do the former. This would be key to sending events to ROUTEs, changing the from/to node names and fields.</div><div dir="auto"><br></div><div dir="auto">This seems like a very powerful feature! I just don’t know how to route SFString events to route statements. Is there an alternative?</div><div dir="auto"><br></div><div dir="auto">Maybe I should create an Uber X3D? Can we add DEF and name to ROUTEs, and make them first class nodes?</div><div dir="auto"><br></div><div dir="auto">I’m not sure how performant this would be, or even how implementable. </div><div dir="auto"><br></div><div dir="auto">It’s probably an idea to throw in the trash! It’s derived from trying to reduce source code size.</div><div dir="auto"><br></div><div dir="auto">Thanks!</div><div dir="auto"><br></div><div dir="auto">John </div><div dir="auto"><br></div><div dir="auto"><br></div>
</blockquote></div></div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>