<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2072993087;
mso-list-type:hybrid;
mso-list-template-ids:-264209140 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Since a Viewpoint is an independent object, am expecting that it would retain its own persistent values and not change if a separate object (previously used as a setter) were to change.<o:p></o:p></li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Right, until the next time the complete SFRotation is applied to the node. </p><p class=MsoNormal>In fact, I think it is not possible to change an node field like axis in this example by just changing one value of the x y z. I seem to remember you can’t apply (by route or by script) parts of an MF, you have to send the entire array. In a script you can set .x .y .z but can’t route or directOut anything but the complete MF. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>expected therefore to copy the axis x,y,z over</li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I would expect that if x y or z of axis was changed, it would not produce any effect until the complete rotation axis, angle was applied. I don’t think we ought to expect to be able to route or directout rot,x, for example until the script completes and the new complete rot x y z a is sent and applied. </p><p class=MsoNormal>Joe</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Friday, March 6, 2020 8:00 AM<br><b>To: </b><a href="mailto:gpugroup@gmail.com">GPU Group</a>; <a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] SFRotation constructor axis argument by referenceorvalue ?</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Since a Viewpoint is an independent object, am expecting that it would retain its own persistent values and not change if a separate object (previously used as a setter) were to change.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The specifications always try to be as precise, unambiguous and succinct as possible.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If there are improvements to functional definitions or descriptive prose that might be made, people are always welcome to make them.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The X3D Working Group (thanks to Web3D Consortium) then tracks issues, helps everyone work to consensus, edits the specifications and submits for Web3D/ISO approval.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 3/6/2020 6:12 AM, GPU Group wrote:</p><p class=MsoNormal>> The 'last one set' rule sounds interesting for Viewpoint {</p><p class=MsoNormal>> SFRotation orientation</p><p class=MsoNormal>> SFVec3f direction</p><p class=MsoNormal>> SFVec3f upVector</p><p class=MsoNormal>> ...</p><p class=MsoNormal>> }</p><p class=MsoNormal>> would allow both ways of setting orientation</p><p class=MsoNormal>> </p><p class=MsoNormal>> On Fri, Mar 6, 2020 at 6:43 AM Andreas Plesch <andreasplesch@gmail.com <mailto:andreasplesch@gmail.com>> wrote:</p><p class=MsoNormal>> </p><p class=MsoNormal>> I looked at the abstract and Java SAI spec. but they do not have more guidance.</p><p class=MsoNormal>> </p><p class=MsoNormal>> In my mind, the argument for the axis vector in the constructor to become decoupled from the rotation, eg. rot.y = 0 in the example, was that SFRotation is only defined in terms of float primitives, x,y,z and a. The constructor using axis is expected therefore to copy the axis x,y,z over and the axis vector would not be kept with the rotation (except perhaps internally for convenience).</p><p class=MsoNormal>> </p><p class=MsoNormal>> Of course, this is quite a lot to deduce from a few lines in the spec.</p><p class=MsoNormal>> </p><p class=MsoNormal>> my 2c,</p><p class=MsoNormal>> </p><p class=MsoNormal>> Andreas</p><p class=MsoNormal>> </p><p class=MsoNormal>> ---on the phone---</p><p class=MsoNormal>> </p><p class=MsoNormal>> On Thu, Mar 5, 2020, 4:04 PM Joseph D Williams <joedwil@earthlink.net <mailto:joedwil@earthlink.net>> wrote:</p><p class=MsoNormal>> </p><p class=MsoNormal>> * So I would guess for ecmascript it should____</p><p class=MsoNormal>> </p><p class=MsoNormal>> be rot.y = 1.0</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> me too because rot values can be set as rot.x rot.y rot.z and rot.a</p><p class=MsoNormal>> </p><p class=MsoNormal>> and axis can be set by by axis.x axis.y and axis.z</p><p class=MsoNormal>> </p><p class=MsoNormal>> so in this example the last one set is the final value.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Joe</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> *From: *Andreas Plesch <mailto:andreasplesch@gmail.com></p><p class=MsoNormal>> *Sent: *Tuesday, March 3, 2020 7:08 AM</p><p class=MsoNormal>> *To: *X3D Graphics public mailing list <mailto:x3d-public@web3d.org></p><p class=MsoNormal>> *Subject: *[x3d-public] SFRotation constructor axis argument by reference orvalue ?</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> In the ecmascript SAI, SFRotation has a constructor which has the</p><p class=MsoNormal>> </p><p class=MsoNormal>> rotation axis as a SFVec3f argument:</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> new SFRotation ( SFVec3f axis, numeric angle )</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> https://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#SFRotation</p><p class=MsoNormal>> </p><p class=MsoNormal>> (Table 7.18, -url in the first sentence is off-)</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> The question is when I make a new SFRotation and later change the</p><p class=MsoNormal>> </p><p class=MsoNormal>> SFVec3f which was used for the axis, does the previously constructed</p><p class=MsoNormal>> </p><p class=MsoNormal>> SFRotation also change ?</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> axis = new SFVec3f ( 0, 0, 1 );</p><p class=MsoNormal>> </p><p class=MsoNormal>> rot = new SFRotation( axis, 3.14 );</p><p class=MsoNormal>> </p><p class=MsoNormal>> axis.y = 1.0</p><p class=MsoNormal>> </p><p class=MsoNormal>> axis.z = 0.0</p><p class=MsoNormal>> </p><p class=MsoNormal>> // rot.y is ?</p><p class=MsoNormal>> </p><p class=MsoNormal>> // constructed by value: rot.y = 0.0</p><p class=MsoNormal>> </p><p class=MsoNormal>> // constructed by reference: rot.y = 1.0</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> I did not check the abstract SAI spec. for guidance so it is very</p><p class=MsoNormal>> </p><p class=MsoNormal>> possible I missed something.</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> This is just an example. There are of course other constructors which</p><p class=MsoNormal>> </p><p class=MsoNormal>> use objects as parameters. It is also probably rare that a script</p><p class=MsoNormal>> </p><p class=MsoNormal>> would want to do this.</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> It may depend on the scripting language. In ecmascript objects are</p><p class=MsoNormal>> </p><p class=MsoNormal>> passed by reference, you have to explicitly make a copy if you need</p><p class=MsoNormal>> </p><p class=MsoNormal>> it. This is for performance. So I would guess for ecmascript it should</p><p class=MsoNormal>> </p><p class=MsoNormal>> be rot.y = 1.0 .</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> -Andreas</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> -- </p><p class=MsoNormal>> </p><p class=MsoNormal>> Andreas Plesch</p><p class=MsoNormal>> </p><p class=MsoNormal>> Waltham, MA 02453</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> _______________________________________________</p><p class=MsoNormal>> </p><p class=MsoNormal>> x3d-public mailing list</p><p class=MsoNormal>> </p><p class=MsoNormal>> x3d-public@web3d.org <mailto:x3d-public@web3d.org></p><p class=MsoNormal>> </p><p class=MsoNormal>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal>> </p><p class=MsoNormal>> __ __</p><p class=MsoNormal>> </p><p class=MsoNormal>> _______________________________________________</p><p class=MsoNormal>> x3d-public mailing list</p><p class=MsoNormal>> x3d-public@web3d.org <mailto:x3d-public@web3d.org></p><p class=MsoNormal>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal>> </p><p class=MsoNormal>> </p><p class=MsoNormal>> _______________________________________________</p><p class=MsoNormal>> x3d-public mailing list</p><p class=MsoNormal>> x3d-public@web3d.org</p><p class=MsoNormal>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal>> </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman Naval Postgraduate School, Code USW/Br brutzman@nps.edu</p><p class=MsoNormal>Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>_______________________________________________</p><p class=MsoNormal>x3d-public mailing list</p><p class=MsoNormal>x3d-public@web3d.org</p><p class=MsoNormal>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>