[x3d-public] Add quaternion utility methods to X3D SFRotation programming-language standards?

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sun Jul 21 15:00:06 PDT 2024


Interesting to see in the online issue discussion below that X3DOM includes quaternion methods.

The SFRotation representation has some similarity to quaternions, but they are of course mathematically distinct.  Quaternions have long been a suggested alternative for X3D, with SFRotation remaining the primary representation since it is much more reviewable and editable (among other reasons). Nevertheless, for programmers, additional flexibility can be considered without conflict.  This may encourage X3D API usage with other 3D programming libraries.

Please consider and advise whether quaternion-based accessor (get and set) utility methods ought to be added to the X3D specifications for SFRotation data type.  Specifically they might become required in X3D Scene Access Interface (SAI), along with all of the future corresponding version 4.0 revisions to X3D programming-language bindings (ECMAScript/JavaScript, Java, C/C++/C#, Python).


  *   X3D Scene Access Interface (SAI), version 4.0 draft
  *   https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-2v4.0-WD1<https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-2v4.0-WD1/>

If so, please list what utility methods seem most broadly valuable.  Based on responses, Dick and I will work on crafting a Mantis issue and draft specification prose for further review.

At that point, once reasonably well defined, am also willing to add convenience methods in Java X3DJSAIL and Python X3DPSAIL (x3d.py) libraries for testing.  Contributions of exemplar source code for those libraries will also be welcome, if anyone wants.

Further interesting is the possibility that we are not only supporting future X3D programmers, but potentially also supporting Metaverse requirements for 3D Web Interoperability.

For those wanting additional background, more information about X3D data types and SFRotation (plus further links) can be found at


  *   X3D Tooltips 4.0:  field types
  *   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#type
  *   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#FieldTypesTable
  *   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#SFRotation

Thanks in advance for considering the possibilities and all feedback.


all the best, Don

--

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, Navy robotics https://faculty.nps.edu/brutzman
________________________________
From: Andreas Plesch <notifications at github.com>
Sent: Wednesday, June 26, 2024 11:03 AM
To: x3dom/x3dom <x3dom at noreply.github.com>
Cc: Subscribed <subscribed at noreply.github.com>
Subject: Re: [x3dom/x3dom] SFMatrix4f() documentation for setRotation and translation (Issue #1322)


SFRotation field methods are also available but less well tested.

SAI code may look like this:

SFRot90 = x3dom.fields.SFRotation(1, 0, 0, 1.57);
locR = SFRot90.multiVec(hitP);
trans = new x3dom.fields.SFVec3f(440000, 3670000, 0);
locT = locR.add(trans);


—
Reply to this email directly, view it on GitHub<https://github.com/x3dom/x3dom/issues/1322#issuecomment-2192318975>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB23BYDQOLK25VKQG3TBTJ3ZJL65PAVCNFSM6AAAAABJRIL4AOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGMYTQOJXGU>.
You are receiving this because you are subscribed to this thread.Message ID: <x3dom/x3dom/issues/1322/2192318975 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240721/87a153dc/attachment.html>


More information about the x3d-public mailing list