Extensible 3D (X3D) language bindings
Part 2: Java
Annex C
(normative)
Concrete node interfaces
This annex provides the definition of the rules to generate interface signature for each interface that represents the concrete node instance as defined in IS0/IEC 19775-1 (see 2.[19775]).
See Table C.1 for the topics in this clause.
Each concrete class shall belong to the sub-package name according to the component
formal name under the org.web3d.x3d.sai
parent package.
(See 3.3.1.4 Package Structure)
Concrete node representations in Java shall be expressed as public interfaces.
Each concrete node shall extend the interfaces defined in Annex B as appropriate for the abstract node requirements for each node type. For example, The Inline interface definition is:
public interface Inline extends X3DChildNode, X3DBoundedObject, X3DUrlObject { ... }
Within each node interface there shall be methods to read and set the values for every field. The naming convention for each field method shall follow the definition in B.1.2 Conventions for the abstract interfaces. Where fields are already covered by the abstract interface, the concrete interface is not required to redeclare the same methods. The concrete interface shall declare methods that are not defined by the abstract node representation.
No additional field definitions are required because all fields are covered by the base interfaces.
package org.web3d.x3d.sai.group; import org.web3d.x3d.sai.*; public interface Group extends X3DGroupingNode { }
Text is a type of X3DGeometryNode, which does not have any fields defined in the base node, so all fields must be declared.
package org.web3d.x3d.sai.text; import org.web3d.x3d.sai.*; public interface Text extends X3DGeometryNode { public void setFontStyle(X3DFontStyleNode node); public void setFontStyle(X3DProtoInstance node); public X3DNode getFontStyle(); public void setLength(float[] length); public int getNumLength(); public void getLength(float[] length); public void setMaxExtent(float extend); public float getMaxExtent(); public void setString(String[] string); public int getNumString(); public void getString(String[] string); }
Text is a type of X3DInterpolatorNode, which has some fields defined in the abstract node type as well as some local fields.
package org.web3d.x3d.sai.interpolator; import org.web3d.x3d.sai.*; public interface ColorInterpolator extends X3DInterpolatorNode { public void setKeyValue(float[] keyValue); public int getNumKeyValue(); public void getKeyValue(float[] keyValue); public void getValueChanged(float[] color); }