[x3d-public] resetting a viewpoint

Leonard Daly Leonard.Daly at realism.com
Tue Jan 30 08:31:40 PST 2018


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:

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.

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.


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 list
> x3d-public at web3d.org
> http://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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180130/606d4d24/attachment-0001.html>


More information about the x3d-public mailing list