I'm not sure if returning void was intentional or not. Suggest changing X3dToJava.xslt to addPhysics, or return this.
/**
* Set single child physics node, replacing prior array of existing nodes (if any).
* <br><br>
* <i>Note:</i> according to X3D Unified Object Model (X3DUOM), acceptable node types are restricted to X3DParticlePhysicsModelNode.
* @param newValue is new node for the physics field (restricted to X3DParticlePhysicsModelNode)
*/
/* @Override */
public void setPhysics(org.web3d.x3d.sai.Core.X3DNode newValue)
{
if (newValue == null)
{
clearPhysics(); // reset newValueNullClearsFieldReturnVoid
return;
}
if (newValue instanceof org.web3d.x3d.sai.Core.X3DNode)
{
for (org.web3d.x3d.sai.Core.X3DNode element : physics)
((X3DConcreteElement) element).clearParent(); // remove references to facilitate Java memory management
clearPhysics(); // reset
((X3DConcreteElement) newValue).setParent(this); // parentTest8
physics.add(newValue);
}
else throw new org.web3d.x3d.sai.InvalidFieldValueException("org.web3d.x3d.sai.Core.X3DNode newValue is not instanceof org.web3d.x3d.sai.Core.X3DNode; newValue=" + newValue);
}
Attaching original file (may be buggy).
Attaching generated Java (from X3dToJava.xslt
Please provide a valid .x3d input model. That is always a necessary prerequisite to testing Java conversion and corresponding X3DJSAIL support.
n.b. this model throws the same validation errors on ParticleSystem contained nodes.