[x3d-public] Suggest taking a different path with BoxManC.x3d

John Carlson yottzumm at gmail.com
Thu Jun 11 10:55:35 PDT 2020


The good news is I'm getting a near clean Java compile from my
JavaSerializer.js generated code.  Here's the only error report there:

BoxManC.java:246: error: cannot find symbol
          .addViewpoint(new
Viewpoint().setDEF("Inclined_View").setDescription("Inclined
View").setOrientation(new float[] {0f,1f,0f,0.78f}).setPosition(new float[]
{2f,1f,2f}))
          ^
  symbol:   method addViewpoint(Viewpoint)
  location: class HAnimHumanoid
1 error

Thanks!

John

Here's the relevant Java code:

./jsail/HAnim/HAnimHumanoid.java:       public HAnimHumanoid
addViewpoints(HAnimSite newValue)
./jsail/HAnim/HAnimHumanoid.java:       public HAnimHumanoid
addViewpoints(ProtoInstance newValue)
./jsail/HAnim/HAnimHumanoid.java:       public void
addViewpoints(org.web3d.x3d.sai.Core.X3DNode[] /* bleah 3 TODO add node
typing */  newValue)
./jsail/X3DLoaderDOM.java:

 ((HAnimHumanoid)elementObject).addViewpoints((HAnimSite) childX3dElement);
./jsail/X3DLoaderDOM.java:

 ((HAnimHumanoid)elementObject).addViewpoints((ProtoInstance)
childX3dElement);
./sai/HAnim/HAnimHumanoid.java: public void addViewpoints(/* here 8b,
saiPackage not found */org.web3d.x3d.sai.Core.X3DNode[] newValue); //
acceptable node types #3: HAnimSite


On Thu, Jun 11, 2020 at 12:20 PM John Carlson <yottzumm at gmail.com> wrote:

> Relevant email:
>
> http://web3d.org/pipermail/x3d-public_web3d.org/2016-July/005048.html
>
> Thanks!
>
> John
>
> On Thu, Jun 11, 2020 at 12:16 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Here are errors we get when trying to compile BoxManC.java, first with
>> X3dToJava.xslt version, then with JavaSerializer.js version.
>>
>> Thanks!
>>
>> $ javac -cp ~/pythonSAI/X3DJSAIL.4.0.full.jar
>> net/x3djsonld/data/BoxManC.java
>> net\x3djsonld\data\BoxManC.java:347: error: no suitable method found for
>> addViewpoints(Viewpoint)
>>       .addViewpoints(new
>> Viewpoint("Inclined_View").setDescription("Inclined
>> View").setOrientation(0.0f,1.0f,0.0f,.78f).setPosition(2.0f,1.0f,2.0f))
>>       ^
>>     method HAnimHumanoid.addViewpoints(HAnimSite) is not applicable
>>       (argument mismatch; Viewpoint cannot be converted to HAnimSite)
>>     method HAnimHumanoid.addViewpoints(ProtoInstance) is not applicable
>>       (argument mismatch; Viewpoint cannot be converted to ProtoInstance)
>>     method HAnimHumanoid.addViewpoints(X3DNode[]) is not applicable
>>       (argument mismatch; Viewpoint cannot be converted to X3DNode[])
>> 1 error
>>
>>
>>
>>
>> $ javac -cp ~/pythonSAI/X3DJSAIL.4.0.full.jar
>> net/coderextreme/data/BoxManC.java
>> net\coderextreme\data\BoxManC.java:175: error: cannot find symbol
>>           .addViewpoint(new
>> Viewpoint().setDEF("Inclined_View").setDescription("Inclined
>> View").setOrientation(new float[] {0f,1f,0f,0.78f}).setPosition(new float[]
>> {2f,1f,2f}))
>>           ^
>>   symbol:   method addViewpoint(Viewpoint)
>>   location: class HAnimHumanoid
>> 1 error
>>
>> Here is the JSON error when trying to validate BoxManC.json:
>>
>> Loading schema
>> Parsing schema
>> Adding schema
>> Schema 3.0 added
>> Schema 3.0 compiled
>>
>> ================================================================================
>> File: BoxManC.json
>> Error reading BoxManC.json
>>  keyword: additionalProperties
>>  dataPath: X3D > Scene > -children > 3 > HAnimHumanoid
>>  value:
>> {"@name":"Humanoid","@DEF":"HUMANOID","@info":"|omitted|","@version":"2.
>>
>> 0","-skeleton":"|omitted|","-children":"|omitted|","-skinCoord":"|omitted|","-sk
>>
>> in":"|omitted|","-joints":"|omitted|","-sites":"|omitted|","-segments":"|omitted
>> |","-viewpoints":"|omitted|"}
>>  message: should not have additional properties
>>  params: {"additionalProperty":"@name"}
>>  file: BoxManC.json
>>  version: 3.0
>>
>>  keyword: additionalProperties
>>  dataPath: X3D > Scene > -children > 3 > HAnimHumanoid > -viewpoints > 0
>>  value: {"Viewpoint":"|omitted|"}
>>  message: should not have additional properties
>>  params: {"additionalProperty":"Viewpoint"}
>>  file: BoxManC.json
>>  version: 3.0
>>
>>  keyword: oneOf
>>  dataPath: X3D > Scene > -children > 3 > HAnimHumanoid
>>  value:
>> {"@name":"Humanoid","@DEF":"HUMANOID","@info":"|omitted|","@version":"2.
>>
>> 0","-skeleton":"|omitted|","-children":"|omitted|","-skinCoord":"|omitted|","-sk
>>
>> in":"|omitted|","-joints":"|omitted|","-sites":"|omitted|","-segments":"|omitted
>> |","-viewpoints":"|omitted|"}
>>  message: should match exactly one schema in "oneOf"
>>  params: {"passingSchemas":null}
>>  file: BoxManC.json
>>  version: 3.0
>>
>> Probably it's some issue with version, or putting Viewpoints in an
>> HAnimSite.  Not really sure.
>>
>> John
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200611/cbf781cd/attachment.html>


More information about the x3d-public mailing list