Class ProtoInstanceObject

java.lang.Object
All Implemented Interfaces:
ProtoInstance, X3DChildNode, X3DNode, X3DPrototypeInstance

public class ProtoInstanceObject
extends X3DConcreteNode
implements ProtoInstance
ProtoInstance can override field default values via fieldValue initializations. Non-recursive nested ProtoInstance and ProtoDeclare statements are allowed within a ProtoDeclare.

X3D statement tooltip: [X3D statement] ProtoInstance creates an instance node of a locally or externally declared prototype definition. ProtoDeclare/ExternProtoDeclare definitions are abstract, corresponding ProtoInstance nodes are concrete. ProtoInstance nodes typically contain fieldValue statements to override default field values defined in the original ProtoDeclare statement.
  • Hint: the node type of a ProtoInstance exactly matches the first node in the corresponding ProtoDeclare/ProtoBody declaration.
  • Warning: be sure to correctly set the containerField value to match the intended field in the parent node.
  • Warning: do not mismatch node types when placing a ProtoInstance in a scene graph. Most validation tools will not catch this error.
  • Hint: scene authors can override default initializations of prototype fields by including contained <fieldValue> elements.
  • Hint: Nested ProtoInstance and ProtoDeclare statements are allowed within a ProtoDeclare/ProtoBody.
  • Hint: if contained within a ProtoDeclare, then a ProtoInstance node can also contain IS/connect statements for other defined fields.
  • Warning: a ProtoInstance node may not be instantiated inside its own ProtoDeclare or ExternProtoDeclare declaration (i.e. recursive prototypes are illegal).
  • Warning: the local context of each ProtoInstance node must match the node type of the first node in the original ProtoDeclare declaration.
  • Warning: ProtoInstance substitution for a Metadata* node might not validate. Workaround: put metadata-typed ProtoInstance nodes as contained values within a parent MetadataSet node.
  • Hint: X3D Scene Authoring Hints, Inlines and Prototypes http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#InlinesPrototypes
  • Hint: X3D Architecture 4.4.4 Prototype semantics, http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#PROTOdefinitionsemantics Examples: X3D Example Archives, X3D for Web Authors, Chapter 14 Prototypes https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes

Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also:
X3D Abstract Specification: ProtoInstance, X3D Tooltips: ProtoInstance, X3D Scene Authoring Hints: InlinesPrototypes