<div dir="ltr"><div>"<span style="color:rgb(0,0,0);font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:14.6667px"> </span><span style="color:rgb(0,0,0);font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:14.6667px">X3DJSAIL is OK."</span></div><div><br></div><div>I would state that X3DJSAIL needs to be rechecked based on recent evidence. It does not take 4 parameters, as X3dToJava.xslt produces (assuming my X3dToJava.xslt is up to date) 4 separate parameters to OrthoViewpoint.fieldOfView, as of 2 days ago (the stylesheet hasn't changed on sourceforge as of today).</div><div><br></div><div> ~/<a href="http://www.web3d.org/x3d/stylesheets/java/src/org/web3d/x3d/jsail/Navigation">www.web3d.org/x3d/stylesheets/java/src/org/web3d/x3d/jsail/Navigation</a><br>$ grep public.*setFieldOfView OrthoViewpoint.java<br> public OrthoViewpoint setFieldOfView(float[] newValue)<br> public OrthoViewpoint setFieldOfView(MFFloat newValue)<br> public OrthoViewpoint setFieldOfView(ArrayList<Float> newValue)<br> public OrthoViewpoint setFieldOfView(int[] newValue)<br> public OrthoViewpoint setFieldOfView(double[] newArray)</div><div><br></div><div>All setFieldOfView methods take a single parameter, yes, an array with 4 values, but I don't know if they are restricted to four. Let me check JSON schema..no maxItems or minItems properties for fieldOfView in JSON Schema. Maybe something is missing in X3DUOM.</div><div><br></div><div> <field name="fieldOfView"<br> type="MFFloat"<br> accessType="inputOutput"<br> default="-1 -1 1 1"<br> description="Minimum and maximum extents of view in units of local coordinate system."/></div><div><br></div><div>An SFVec4f would be better for restricting the number of values in the MFFloat.</div><div><br></div><div>That would be OK by me, but there's no fieldOfView field in the corresponding JSON or XML output from X3DJSAIL!</div><div><br></div><div> May I suggest making a comprehensive example of all nodes, attributes and fields in a single Java program?</div><div><br></div><div>This is probably a subject still under discussion. I just want my data back from the array I passed in:</div><div><br></div><div>setFieldOfView(new MFFloat3().getArray()))</div><div><br></div><div>private class MFFloat3 {<br> private org.web3d.x3d.jsail.fields.MFFloat getArray() {<br> return new org.web3d.x3d.jsail.fields.MFFloat(new double[] {0f,0f,10f,10f});<br> }<br>}</div><div><br></div><div>Here's the line of Java code generated by X3dToJava.xslt. Note, 4 separate parameters.</div><div><br></div><div>$ grep setFieldOfView *.java<br>Connectors.java: .addChild(new OrthoViewpoint().setDescription("OthoViewpoint").setCenterOfRotation(-3.13496,-4.19776,0.0).setFieldOfView(0.0,0.0,10.0,10.0).setPosition(-3.13496,-4.19776,10.0))</div><div>[snip, others with Viewpoint have a single float/double parameter. I am referring to OrthoViewpoint]</div><div><br></div><div>Try the raw version of Connectors.x3d in X_ITE Playground after removing OrthoViewpoint.fieldOfView to see what happens:</div><div><br></div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/create3000/Library/refs/heads/main/Tests/Components/Shape/Connectors.x3d">https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/create3000/Library/refs/heads/main/Tests/Components/Shape/Connectors.x3d</a></div><div><br></div><div>That's what I'm getting in Sunrize. A blank screen. Luckily, I had some diffs generated from the original .x3d so tracking down difficulties became easy!</div><div><br></div><div>I encourage you to check out Holger's Library examples for testing!</div><div>==============================================================================</div><div>my X3DUOM has one change after yours:</div><div><br></div><div>PS C:\Users\jcarl\<a href="http://www.web3d.org">www.web3d.org</a>\specifications> svn-diff<br>Index: C:/Users/jcarl/<a href="http://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml">www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml</a><br>===================================================================<br>--- C:/Users/jcarl/<a href="http://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml">www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml</a> (revision 37269)<br>+++ C:/Users/jcarl/<a href="http://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml">www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml</a> (working copy)<br>@@ -21322,7 +21322,6 @@<br> type="SFVec3f"<br> accessType="inputOutput"<br> default="1 1 1"<br>- minExclusive="0"<br> description="Non-uniform x-y-z scale of child coordinate system, adjusted by center and scaleOrientation."/><br> <field name="scaleOrientation"<br> type="SFRotation"</div><div><br></div><div><br></div><div>This is to avoid scale -1 complaints in HAnimHumanoid, but I think I fixed the data, so I will restore your version, recalling that I need to restore Holger's X_ITE changes to the X3DUOM to JSON schema (eventually)</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Dec 28, 2024 at 11:07 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-9053836699177252249"><div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
4. "OrthoViewpoint.setFieldOfView has 4 parameters, probably should be one parameter, or X3DJSAIL should provide a 4 parameter option."</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
OrthoViewpoint fieldOfView is only zero or four floats. Anything else does not define the 4 corners of an orthographic field of view. X3DJSAIL is OK.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
This has been the basis of the long-running issue: do we leave it with type MFFloat, or do we make it type SFVec4f (similar to ClipPlane.plane and TextureProjectorParallel.fieldOfView) so that incorrect array lengths are detected during validation.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
Related:</div>
<ul style="list-style-type:disc">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div>X3D Tooltips 4.0, OrthoViewpoint.fieldOfView</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#OrthoViewpoint.fieldOfView" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#OrthoViewpoint.fieldOfView</a></div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><b>Warning: </b>if provided, OrthoViewpoint fieldOfView has exactly four numeric values, otherwise results are undefined.</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><b>Warning:</b> OrthoViewpoint fieldOfView has type MFFloat even though SFVec3f is more correct to prevent modeling errors, deficiency recorded as Mantis 1398</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><br>
</div>
</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div>Mantis 1398: OrthoViewpoint fieldOfView type needs to be SFVec4f, not MFFloat</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><a href="https://mantis.web3d.org/view.php?id=1398" target="_blank">https://mantis.web3d.org/view.php?id=1398</a></div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><br>
</div>
</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div>X3D Architecture 4.1 (draft), 42.4.2 TextureProjectorParallel</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/navigation.html#OrthoViewpoint" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/navigation.html#OrthoViewpoint</a></div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div>The <i>fieldOfView</i> field <span style="background-color:rgb(255,255,0)">
for this parallel projection</span> specifies minimum and maximum extents of the view in units of the local coordinate system. A small field of view roughly corresponds to a telephoto lens; a large field of view roughly corresponds to a wide-angle lens.
<span style="background-color:rgb(255,255,0)">If provided, the <i>fieldOfView</i> field has exactly four numeric values, otherwise results are undefined.</span></div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div>X3DJSAIL OrthoViewpoint setFieldOfView has multiple methods for floats, doubles (which are downcast to floats) and integers (which are promoted to floats). The preceding warning will appear in the Javadoc following the next release
build.</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<div><a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Navigation/OrthoViewpoint.html#setFieldOfView(float[])" target="_blank">https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Navigation/OrthoViewpoint.html#setFieldOfView(float[])</a></div>
</li></ul>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
I hope that this answer is satisfactory.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)"><br></div>
</div>
</div></blockquote></div></div>