[x3d-public] Viewpoint centerOfRotation global or local

Andreas Plesch andreasplesch at gmail.com
Sat Dec 5 20:01:37 PST 2020


I was surprised that x3dom uses the global coordinate system for
Viewpoint's centerOfRotation field. But it turns out that the spec.
does not say that it is given in the local coordinate system

https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/navigation.html#X3DViewpointNode
https://www.web3d.org/x3d/content/X3dTooltips.html#Viewpoint

So using the global coordinate system seems appropriate.

Relatedly, the new viewAll field affects the centerOfRotation field:

"When the viewAll field is set to TRUE or a viewpoint is bound with
viewAll field TRUE, the current view is modified to change the
centerOfRotation field to match [the] center of bounding box for
entire visible scene, and the orientation field is modified to aim at
that point."

Here, the new centerOfRotation would make more sense to be given in
the global coordinate system since the entire scene is considered.
But, of course, it would be possible for the browser to compute the
corresponding position in the Viewpoint's local coordinate system as
well.

So is x3dom correct in using the global coordinate system (ignoring
outer Transforms) for Viewpoint's centerOfRotation field ?

Thanks, Andreas
-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list