[x3d-public] X3D Java SAI. ROUTE Event Source/Destination discussion

Don Brutzman brutzman at nps.edu
Wed Jan 18 15:04:50 PST 2017


preliminary response

the scene passes validator tests:

	http://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/StripedSurfPerchPlaqueIndex.html

`	checkmark button:
	https://savage.nps.edu/X3dValidator?url=http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/StripedSurfPerchPlaque.x3d

improved some of the diagnostic outputs

found the problem:  getType and getAccessType for ProtoInstance not yet implemented.

work in progress...

On 1/18/2017 3:16 AM, yottzumm at gmail.com wrote:
> www_web3d_org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/StripedSurfPerchPlaque
>
> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ROUTE has source-destination type mismatch. ROUTE event destination must have accessType='inputOutput' or accessType='outputOnly'. ,       FROM BlueRockfishTouchSensor.touchTime (TouchSensor.SFTime.outputOnly) TO BLUEROCKFISHCLOCK.set_startTime (TimeSensor.UnknownField_TimeSensor.UnknownField_TimeSensor)
>
>         at org.web3d.x3d.java.Core.ROUTEObject.validate(ROUTEObject.java:496)
>
>         at org.web3d.x3d.java.Core.SceneObject.validate(SceneObject.java:427)
>
>         at org.web3d.x3d.java.Core.X3DObject.validate(X3DObject.java:1434)
>
>         at org.web3d.x3d.java.Core.X3DObject.toFileJSON(X3DObject.java:657)
>
>         at www_web3d_org.x3d.content.examples.X3dForWebAuthors.KelpForestExhibit.StripedSurfPerchPlaque.main(StripedSurfPerchPlaque.java:347)
>
>
>
>
>
> I am constructing field objects like this:
>
>                 fieldObject field0_0_4_0_0 = new fieldObject();
>
>                   field0_0_4_0_0.setName("xtranslation");
>
>                   field0_0_4_0_0.setAccessType("inputOutput");
>
>                   field0_0_4_0_0.setType("SFVec3f");
>
>                   field0_0_4_0_0.setValue("0 0 0");
>
> And not like this:
>
> fieldObject outputColorsField = new fieldObject(outputColorsFieldName, fieldObject.TYPE_MFCOLOR, fieldObject.ACCESSTYPE_OUTPUTONLY);
>
>
>
> However, in this particular file, no fields are present.  So I guess I’ll have to construct them for each route as I build the route?  Thanks, trying to automate.  Also, I’m trying to figure out what to do WHEN the fields are present.
>
>
>
> Or can the validate routines ignore the accessType if it’s not specified?  Or construct the fieldObject when a string is specified in a ROUTEs fromField or toField?
>
>
>
> Question, if we do put the fields in the code, will they appear in the JSON when we don’t want them to?
>
>
> Thanks,
>
>
>
> John
>


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 http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list