[x3d-public] resetting a viewpoint

Andreas Plesch andreasplesch at gmail.com
Tue Jan 30 08:59:55 PST 2018


Hi Leonard,

On Tue, Jan 30, 2018 at 11:31 AM, Leonard Daly <Leonard.Daly at realism.com>
wrote:

> Andreas,
>
> The relevant portion of the spec is at http://www.web3d.org/
> documents/specifications/19775-1/V3.3/Part01/components/navigation.html#
> X3DViewpointNode, in particular paragraph e2. It goes:
>
> e. When a set_bind TRUE event is received by an *X3DViewpointNode* node,
>    1. ...
>    2. If the node is already at the top of the stack, this event has no
> affect.
>
> It should not work to send a 'set_bind' event to the VP node. Also
> unbinding, then binding the node, then paragraph f3 counts:
>

Ok, no effect. So how then would one best reset, let's say by a Touchsensor
? Let's see.


>
> f. When a *set_bind* FALSE event is received by an *X3DViewpointNode*
> node in the stack, it is removed from the stack. If it was on the top of
> the stack,
> *    3. if its jump field value is TRUE, the user's view is
> instantaneously "jumped" to the position and orientation of the next
> X3DViewpointNode node in the stack with the stored relative transformation
> of this next X3DViewpointNode node applied.*
>
> 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.
>
>
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.


> 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.
>
>
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
?

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.




> Leonard Daly
>
>
>
>
>
> 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.
>
> Would it work to send true to the set_bind field of the currently bound
> viewpoint to reset the view, with retainUserOffsets false ?
>
> 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 ?
>
> x3dom has a resetView() function and x_cite has browser.bindViewpoint(viewpoint),
> a nonstandard SAI function which can be used for this purpose. What would
> be the standard way to reset a view ?
>
> Thanks, -Andreas
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
>
> _______________________________________________
> x3d-public mailing listx3d-public at web3d.orghttp://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> --
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Past Chair
> President, Daly Realism - *Creating the Future*
>



-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180130/33c9b17e/attachment.html>


More information about the x3d-public mailing list