<div dir="ltr">Hi Leonard,<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 30, 2018 at 11:31 AM, Leonard Daly <span dir="ltr"><<a href="mailto:Leonard.Daly@realism.com" target="_blank">Leonard.Daly@realism.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_8852075051642604311moz-cite-prefix">Andreas,<br>
      <br>
      The relevant portion of the spec is at
<a class="m_8852075051642604311moz-txt-link-freetext" href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/navigation.html#X3DViewpointNode" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/navigation.html#<wbr>X3DViewpointNode</a>,
      in particular paragraph e2. It goes:<br>
      <br>
      e. When a set_bind <span class="m_8852075051642604311code">TRUE</span> event is
      received by an <i>X3DViewpointNode</i> node,<br>
         1. ...<br>
         2. If the node is already at the top of the stack, this event
      has no affect.<br>
      <br>
      It should not work to send a 'set_bind' event to the VP node. Also
      unbinding, then binding the node, then paragraph f3 counts:<br></div></div></blockquote><div><br></div><div>Ok, no effect. So how then would one best reset, let's say by a Touchsensor ? Let's see.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div class="m_8852075051642604311moz-cite-prefix">
      <br>
      f. When a <i>set_bind</i> <code>FALSE</code> event is received
      by an <i>X3DViewpointNode</i> node in the stack, it is removed
      from the stack. If it was on the top of the stack,<b><br>
           3. if its <i>jump</i> field value is <code>TRUE</code>, the
        user's view is instantaneously "jumped" to the <i>position</i>
        and <i>orientation</i> of the next <i>X3DViewpointNode</i>
        node in the stack <u>with</u> the stored relative
        transformation of this next <i>X3DViewpointNode</i> node
        applied.</b><br>
      <br>
      So if you were to bind a new VP, then immediately (next timestamp)
      unbind it, the relative transform of the original VP node would be
      applied as an offset to the the position/orientation indicated in
      the node.<br>
      <br></div></div></blockquote><div><br></div><div>Presumably then, if there is only one Viewpoint in the stack, it is removed but then immediately added back to the top of the stack and rebound. Although point 3) says that the stored relative transform (presumably the UserOffset) is applied unconditionally, it would seem to be more appropriate if the retainUserOffsets would be taken into account. Since retainUserOffsets is by default false, the relative transformation would be reset to zero, which mean a reset of the viewpoint.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div class="m_8852075051642604311moz-cite-prefix">
      In order to undo a user's wandering from a VP, it would be
      necessary to get the offset position & orientation from the VP
      node.<br>
      <br></div></div></blockquote><div><br></div><div>So set_bind false for a single VP may work but how to reset the current view to the currently bound viewpoint in case there are multiple viewpoints ?</div><div><br></div><div>One workaround is to have two identical viewpoints and just bind to the other for a reset effect. But that seems like hacking around something.</div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div class="m_8852075051642604311moz-cite-prefix">
      <br>
      Leonard Daly<br>
      <br>
      <br>
      <br>
      <br>
      <br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>The question came up of how to reset the view after some
          navigation to the initial position/orientation of the
          viewpoint. One could go to another viewpoint and then back but
          the idea is to directly reset the current viewpoint.</div>
        <div><br>
        </div>
        <div>Would it work to send true to the set_bind field of the
          currently bound viewpoint to reset the view, with
          retainUserOffsets false ?</div>
        <div><br>
        </div>
        <div>I could not really find in the spec. what should happen if
          an already bound viewpoint's set_bind field receives true. Is
          the event just ignored ?</div>
        <div><br>
        </div>
        <div>x3dom has a resetView() function and x_cite has
          browser.bindViewpoint(<wbr>viewpoint), a nonstandard SAI function
          which can be used for this purpose. What would be the standard
          way to reset a view ?</div>
        <div><br>
        </div>
        <div>Thanks, -Andreas</div>
        <div><br><span class="HOEnZb"><font color="#888888">
        </font></span></div><span class="HOEnZb"><font color="#888888">
        <div><br>
        </div>
        -- <br>
        <div class="m_8852075051642604311gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>Andreas Plesch<br>
              Waltham, MA 02453</div>
          </div>
        </div>
      </font></span></div><span class="HOEnZb"><font color="#888888">
      <br>
      <fieldset class="m_8852075051642604311mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
x3d-public mailing list
<a class="m_8852075051642604311moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>
<a class="m_8852075051642604311moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/<wbr>listinfo/x3d-public_web3d.org</a>
</pre>
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <p><br>
    </p>
    <div class="m_8852075051642604311moz-signature">-- <br>
      <font class="m_8852075051642604311tahoma,arial,helvetica m_8852075051642604311san m_8852075051642604311serif" color="#333366">
        <font size="+1"><b>Leonard Daly</b></font><br>
        3D Systems & Cloud Consultant<br>
        LA ACM SIGGRAPH Past Chair<br>
        President, Daly Realism - <i>Creating the Future</i>
      </font></div>
  </font></span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</div></div>