Class X3DConcreteNode
java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteNode
- Direct Known Subclasses:
AcousticProperties, Analyser, Anchor, Appearance, Arc2D, ArcClose2D, AudioClip, AudioDestination, Background, BallJoint, Billboard, BiquadFilter, BlendedVolumeStyle, BooleanFilter, BooleanSequencer, BooleanToggle, BooleanTrigger, BoundaryEnhancementVolumeStyle, BoundedPhysicsModel, Box, BufferAudioSource, CADAssembly, CADFace, CADLayer, CADPart, CartoonVolumeStyle, ChannelMerger, ChannelSelector, ChannelSplitter, Circle2D, ClipPlane, CollidableOffset, CollidableShape, Collision, CollisionCollection, CollisionSensor, CollisionSpace, Color, ColorChaser, ColorDamper, ColorInterpolator, ColorRGBA, ComposedCubeMapTexture, ComposedShader, ComposedTexture3D, ComposedVolumeStyle, Cone, ConeEmitter, Contact, Contour2D, ContourPolyline2D, Convolver, Coordinate, CoordinateChaser, CoordinateDamper, CoordinateDouble, CoordinateInterpolator, CoordinateInterpolator2D, Cylinder, CylinderSensor, Delay, DirectionalLight, DISEntityManager, DISEntityTypeMapping, Disk2D, DoubleAxisHingeJoint, DynamicsCompressor, EaseInEaseOut, EdgeEnhancementVolumeStyle, ElevationGrid, EnvironmentLight, EspduTransform, ExplosionEmitter, Extrusion, FillProperties, FloatVertexAttribute, Fog, FogCoordinate, FontLibrary, FontStyle, ForcePhysicsModel, Gain, GeneratedCubeMapTexture, GeoCoordinate, GeoElevationGrid, GeoLocation, GeoLOD, GeoMetadata, GeoOrigin, GeoPositionInterpolator, GeoProximitySensor, GeoTouchSensor, GeoTransform, GeoViewpoint, Group, HAnimDisplacer, HAnimHumanoid, HAnimJoint, HAnimMotion, HAnimPose, HAnimSegment, HAnimSite, ImageCubeMapTexture, ImageTexture, ImageTexture3D, IndexedFaceSet, IndexedLineSet, IndexedQuadSet, IndexedTriangleFanSet, IndexedTriangleSet, IndexedTriangleStripSet, Inline, InlineGeometry, IntegerSequencer, IntegerTrigger, IsoSurfaceVolumeData, KeySensor, Layer, LayerSet, Layout, LayoutGroup, LayoutLayer, LinePickSensor, LineProperties, LineSet, ListenerPointSource, LoadSensor, LocalFog, LOD, Material, Matrix3VertexAttribute, Matrix4VertexAttribute, MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataSet, MetadataString, MicrophoneSource, MotorJoint, MovieTexture, MultiTexture, MultiTextureCoordinate, MultiTextureTransform, NavigationInfo, Normal, NormalInterpolator, NurbsCurve, NurbsCurve2D, NurbsOrientationInterpolator, NurbsPatchSurface, NurbsPositionInterpolator, NurbsSet, NurbsSurfaceInterpolator, NurbsSweptSurface, NurbsSwungSurface, NurbsTextureCoordinate, NurbsTrimmedSurface, OpacityMapVolumeStyle, OrientationChaser, OrientationDamper, OrientationInterpolator, OrthoViewpoint, OscillatorSource, PackagedShader, ParticleSystem, PeriodicWave, PhysicalMaterial, PickableGroup, PixelTexture, PixelTexture3D, PlaneSensor, PointEmitter, PointLight, PointPickSensor, PointProperties, PointSet, Polyline2D, PolylineEmitter, Polypoint2D, PositionChaser, PositionChaser2D, PositionDamper, PositionDamper2D, PositionInterpolator, PositionInterpolator2D, PrimitivePickSensor, ProgramShader, ProjectionVolumeStyle, ProtoInstance, ProximitySensor, QuadSet, ReceiverPdu, Rectangle2D, RenderedTexture, RigidBody, RigidBodyCollection, ScalarChaser, ScalarDamper, ScalarInterpolator, ScreenFontStyle, ScreenGroup, Script, SegmentedVolumeData, ShadedVolumeStyle, ShaderPart, ShaderProgram, Shape, SignalPdu, SilhouetteEnhancementVolumeStyle, SingleAxisHingeJoint, SliderJoint, Sound, SpatialSound, Sphere, SphereSensor, SplinePositionInterpolator, SplinePositionInterpolator2D, SplineScalarInterpolator, SpotLight, SquadOrientationInterpolator, StaticGroup, StreamAudioDestination, StreamAudioSource, StringSensor, SurfaceEmitter, Switch, Tangent, TexCoordChaser2D, TexCoordDamper2D, Text, TextureBackground, TextureCoordinate, TextureCoordinate3D, TextureCoordinate4D, TextureCoordinateGenerator, TextureProjector, TextureProjectorParallel, TextureProperties, TextureTransform, TextureTransform3D, TextureTransformMatrix3D, TimeSensor, TimeTrigger, ToneMappedVolumeStyle, TouchSensor, Transform, TransformSensor, TransmitterPdu, TriangleFanSet, TriangleSet, TriangleSet2D, TriangleStripSet, TwoSidedMaterial, UniversalJoint, UnlitMaterial, Viewpoint, ViewpointGroup, Viewport, VisibilitySensor, VolumeData, VolumeEmitter, VolumePickSensor, WaveShaper, WindPhysicsModel, WorldInfo
Abstract parent class for concrete X3D nodes, containing common methods and member variables.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionString[]This string array provides all allowed containerField values for this node, starting with the default value.Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value.Fields inherited from class X3DConcreteElement
NAME, validationResultModifier and TypeFieldDescriptionprotected static final StringString constant NAME provides name of this element; overridden by implementing class.protected StringBuilderResults log of local validation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]containerField describes the field relationship of a node to its parent.abstract StringcontainerField describes the field relationship of a node to its parent.Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value.getDEF()Provide String value from inputOutput SFString field named DEF.Public SFString accessor for field named DEF has default value equal to an empty string.abstract ISgetIS()Provide field named IS for establishing IS/connect field connections between ProtoInterface fields and internal ProtoBody nodes.getName()Utility method to permit querying name valuegetUSE()Provide String value from inputOutput SFString field named USE.Public SFString accessor for field named USE has default value equal to an empty string.booleanhasDEF()Utility method to indicate whether this element has a DEF identifier.booleanWhether or not this class has a getName() methodbooleanhasUSE()Utility method to indicate whether this element has a USE reference to another previously defined element (which means other fields must be empty).protected voidProtected method for X3DJSAIL class initialize() methods to indicate whether the current concrete node has a getName() methodvoidInitialize all member variables to default values.static final booleanisNode()Utility method to indicate whether this element is an X3D Graphics node (implementing X3DConcreteNode), returns true.static final booleanUtility method to indicate whether this element is an X3D Graphics statement (implementing X3DConcreteStatement), returns false.voidWarning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value.protected voidsetConcreteDEF(String newValue) Protected internal superclass method to keep DEF private, scene authors should use method setDEF(newValue) instead.protected final voidsetConcreteUSE(String newValue) Protected internal superclass method to keep USE private, scene authors should use method setUse(newValue) instead.setContainerFieldOverride(String value) Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value.abstract X3DConcreteNodesetCssClass(String cssClass) Each concrete class must independently override this abstract method to enable object-specific method pipelining.abstract X3DConcreteNodesetCssStyle(String cssStyle) Each concrete class must independently override this abstract method to enable object-specific method pipelining.abstract X3DConcreteNodeEach concrete class must independently override this abstract method to enable object-specific method pipelining.abstract X3DConcreteNodeEach concrete class must independently override this abstract method to enable object-specific method pipelining.abstract X3DConcreteNodeAssign field named IS for establishing IS/connect field connections between ProtoInterface fields and internal ProtoBody nodes.abstract X3DConcreteNodesetMetadata(ProtoInstance newValue) Assign X3DMetadataObject instance (using a properly typed ProtoInstance) to inputOutput SFNode field metadata.abstract X3DConcreteNodesetMetadata(X3DMetadataObject newValue) Assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.abstract X3DConcreteNodeEach concrete class must independently override this abstract method to enable object-specific method pipelining.Methods inherited from class X3DConcreteElement
addComments, addComments, addComments, addComments, clearParent, findAncestorElementByName, findAncestorProtoBody, findAncestorScene, findAncestorX3D, findElementByNameValue, findElementByNameValue, findNodeByDEF, getAccessType, getComponent, getComponentLevel, getCssClass, getCssClassDefault, getCssStyle, getCssStyleDefault, getElementName, getFieldType, getHtmlId, getHtmlIdDefault, getPackageName, getParent, getValidationResult, hasAncestorElementByName, hasAncestorProtoBody, hasAncestorScene, hasAncestorX3D, hasParent, isValid, setConcreteCssClass, setConcreteCssStyle, setConcreteHtmlId, setParent, toStringClassicVRML, toStringClassicVRML, toStringVRML97, toStringVRML97, toStringX3D, toStringX3D, validateModifier and TypeMethodDescriptionDebug support: adding empty comment as CommentsBlock to children field has no effect.abstract X3DConcreteElementaddComments(String newComment) Add comment as String to contained commentsList.abstract X3DConcreteElementaddComments(String[] newComments) Add comments as String[] array to contained commentsList.abstract X3DConcreteElementaddComments(CommentsBlock newCommentsBlock) Add CommentsBlock to elementvoidPackage-protected internal method to clear local reference to parent object, if any.findAncestorElementByName(String ancestorElementName) Find object reference to ancestor element (i.e. node or statement), if this object is an attached child.Find object reference to ancestor ProtoBody, if this node or statement is a child.Find object reference to ancestor Scene element, assumes this object is an attached child.Find object reference to ancestor X3D element, if this node or statement is part of an X3D object.abstract X3DConcreteElementfindElementByNameValue(String nameValue) Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element.abstract X3DConcreteElementfindElementByNameValue(String nameValue, String elementName) Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element.abstract X3DConcreteNodefindNodeByDEF(String DEFvalue) Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.abstract StringgetAccessType(String fieldName) Indicate accessType corresponding to given fieldName.abstract StringDefines X3D component for this element.abstract intProvides default X3D component level for this elementProvide String value from inputOutput SFString field named class.static final StringPublic SFString accessor for field named class for CSS has default value equal to an empty string.Provide String value from inputOutput SFString field named style.static final StringPublic SFString accessor for field named style for CSS has default value equal to an empty string.abstract StringProvides name of this element.abstract StringgetFieldType(String fieldName) Indicate type corresponding to given fieldName.Provide String value from inputOutput SFString field named id.static final StringPublic SFString accessor for field named id for html has default value equal to an empty string.static StringgetPackageName(String className) Provide fully qualified package for a given element object, including className.Provide object reference to parent X3D node or statement, if any.Get output of results from prior validation, if anybooleanhasAncestorElementByName(String ancestorElementName) Determine whether ancestor element (i.e. node or statement) is found, meaning this object is an attached child.booleanDetermine whether ancestor ProtoBody element is found, meaning this object is an attached child.booleanDetermine whether ancestor Scene element is found, meaning this object is an attached child.booleanDetermine whether ancestor X3D element is found, meaning this object is an attached child.booleanWhether parent object exists.booleanisValid()Recursive method to determine whether this element is valid.protected voidsetConcreteCssClass(String newValue) Protected internal superclass method to keep cssClass private, scene authors should use method setCssClass(newValue) instead.protected voidsetConcreteCssStyle(String newValue) Protected internal superclass method to keep cssStyles private, scene authors should use method setCssStyle(newValue) instead.protected voidsetConcreteHtmlId(String newValue) Protected internal superclass method to keep HTML id private, scene authors should use method setHtmlId(newValue) instead.voidsetParent(X3DConcreteElement newParentObject) Package-internal method to set parent object reference.Recursive method to provide ClassicVRML string serialization.abstract StringtoStringClassicVRML(int indentLevel) Recursive method to provide ClassicVRML string serialization.Recursive method to provide VRML97 string serialization.abstract StringtoStringVRML97(int indentLevel) Recursive method to provide VRML97 string serialization.Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.abstract StringtoStringX3D(int indentLevel) Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.abstract Stringvalidate()Recursive method to validate this element plus all contained nodes and statements, using both datatype-specification value checks and regular expression (regex) checking of corresponding string values.
-
Field Details
-
containerFieldOverride
Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value. Programmer usage is not ordinarily needed when using this API (in rare cases it may be needed for ProtoInstance nodes). Instead of using containerFieldOverride workaround methods, focus on defining correct parent-child node relationships instead.- See Also:
-
containerField_ALLOWED_VALUES
This string array provides all allowed containerField values for this node, starting with the default value. Note that containerField describes the field relationship of a node to its parent. Modification of this value is not needed when using this API, since alternative values are provided for informational purposes. When relevant, a concrete class independently overrides this array with final values.- See Also:
-
-
Constructor Details
-
X3DConcreteNode
public X3DConcreteNode()
-
-
Method Details
-
isNode
public static final boolean isNode()Utility method to indicate whether this element is an X3D Graphics node (implementing X3DConcreteNode), returns true.- Returns:
- whether this element is an X3D Graphics node: true
- See Also:
-
isStatement
public static final boolean isStatement()Utility method to indicate whether this element is an X3D Graphics statement (implementing X3DConcreteStatement), returns false.- Returns:
- whether this element is an X3D Graphics statement: false
- See Also:
-
initialize
public void initialize()Initialize all member variables to default values.- Overrides:
initializein classX3DConcreteElement
-
includesNameField
protected void includesNameField()Protected method for X3DJSAIL class initialize() methods to indicate whether the current concrete node has a getName() method -
hasNameField
public boolean hasNameField()Whether or not this class has a getName() method- Returns:
- whether this X3D node includes a name field
-
getName
Utility method to permit querying name value- Returns:
- name value if available for this class
-
getDEF
Provide String value from inputOutput SFString field named DEF.
Tooltip: DEF defines a unique ID name for this node, referenceable by other nodes.- Hint: descriptive DEF names improve clarity and help document a model.
- Hint: well-defined names can simplify design and debugging through improved author understanding.
- Hint: USE references to previously defined DEF geometry (instead of duplicating nodes) can improve performance.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
- Returns:
- value of DEF field
- See Also:
-
getDEFDefault
Public SFString accessor for field named DEF has default value equal to an empty string.- Returns:
- empty string
-
hasDEF
public boolean hasDEF()Utility method to indicate whether this element has a DEF identifier.
Tooltip: DEF defines a unique ID name for this node, referenceable by other nodes.- Hint: descriptive DEF names improve clarity and help document a model.
- Hint: well-defined names can simplify design and debugging through improved author understanding.
- Hint: USE references to previously defined DEF geometry (instead of duplicating nodes) can improve performance.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
- Returns:
- whether this node is a USE reference
- See Also:
-
getUSE
Provide String value from inputOutput SFString field named USE.
Tooltip: USE means reuse an already DEF-ed node ID, excluding all child nodes and all other attributes (except for containerField, which can have a different value).- Hint: USE references to previously defined DEF geometry (instead of duplicating nodes) can improve performance.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
- Returns:
- value of USE field
- See Also:
-
getUSEDefault
Public SFString accessor for field named USE has default value equal to an empty string.- Returns:
- empty string
-
hasUSE
public boolean hasUSE()Utility method to indicate whether this element has a USE reference to another previously defined element (which means other fields must be empty).
Tooltip: USE means reuse an already DEF-ed node ID, excluding all child nodes and all other attributes (except for containerField, which can have a different value).- Hint: USE references to previously defined DEF geometry (instead of duplicating nodes) can improve performance.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
- Returns:
- whether this node is a USE reference
- See Also:
-
setConcreteDEF
Protected internal superclass method to keep DEF private, scene authors should use method setDEF(newValue) instead.- Parameters:
newValue- is new value for the DEF field.- See Also:
-
setConcreteUSE
Protected internal superclass method to keep USE private, scene authors should use method setUse(newValue) instead.- Parameters:
newValue- is new value for the USE field.- See Also:
-
setDEF
Each concrete class must independently override this abstract method to enable object-specific method pipelining.- Parameters:
DEFlabel- is new value for the DEF field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setUSE
Each concrete class must independently override this abstract method to enable object-specific method pipelining.- Warning: note that the
setUSE()method on this node resets all other fields to their default values (except for containerField) and also releases all child nodes. - Warning: no other operations can be performed to modify a USE node other than setting an alternate containerField value.
- Parameters:
USEname- is new value for the USE field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
- Warning: note that the
-
setCssClass
Each concrete class must independently override this abstract method to enable object-specific method pipelining. This attribute is only functional if the X3D model is loaded within an HTML page. Tooltip: The class attribute is a space-separated list of classes, reserved for use by CSS cascading stylesheets.- Parameters:
cssClass- is new value for the class field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setHtmlId
Each concrete class must independently override this abstract method to enable object-specific method pipelining. This attribute is only functional if the X3D model is loaded within an HTML page. Tooltip: the id attribute on each X3D node is considered a unique identifier when used as part of an encompassing HTML/DOM context.- Parameters:
htmlID- is new value for the id field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setCssStyle
Each concrete class must independently override this abstract method to enable object-specific method pipelining. This attribute is only functional if the X3D model is loaded within an HTML page. Tooltip: The style attribute provides an inline block of CSS source for element styling, reserved for use by CSS cascading stylesheets.- Parameters:
cssStyle- is new value for the class field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setMetadata
Assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.- Parameters:
newValue- is new value for the metadata field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setMetadata
Assign X3DMetadataObject instance (using a properly typed ProtoInstance) to inputOutput SFNode field metadata.- Parameters:
newValue- is new value for the metadata field.- Returns:
X3DConcreteNode- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setIS
Assign field named IS for establishing IS/connect field connections between ProtoInterface fields and internal ProtoBody nodes. The IS statement connects node fields defined inside a ProtoBody declaration back to corresponding ProtoInterface fields.- Parameters:
newValue- is new value for the description field.- Returns:
- this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
- See Also:
-
getIS
Provide field named IS for establishing IS/connect field connections between ProtoInterface fields and internal ProtoBody nodes. The IS statement connects node fields defined inside a ProtoBody declaration back to corresponding ProtoInterface fields.- Returns:
- current IS, if any
- See Also:
-
getContainerFieldDefault
containerField describes the field relationship of a node to its parent. Modification of this value is not needed when using this API, since alternative values are provided for informational purposes. Each concrete class must independently override this array with a final value.- Returns:
- default containerField value for this node
- See Also:
-
getContainerFieldAllowedValues
containerField describes the field relationship of a node to its parent. Modification of this value is not ordinarily needed when using this API, since alternative values are provided for informational purposes.- Returns:
- array of allowed String values
- See Also:
-
getContainerFieldOverride
Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value. Programmer usage is not ordinarily needed when using this API (in rare cases it may be needed for ProtoInstance nodes). Instead of using containerFieldOverride workaround methods, focus on defining correct parent-child node relationships instead.- Returns:
- containerFieldOverride value, if any
- See Also:
-
setContainerFieldOverride
Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value. Programmer usage is not ordinarily needed when using this API (in rare cases it may be needed for ProtoInstance nodes). Instead of using containerFieldOverride workaround methods, focus on defining correct parent-child node relationships instead.- Parameters:
value- to set containerFieldOverride, must be allowed in containerField_ALLOWED_VALUES- Returns:
- object reference to node
- See Also:
-
resetContainerFieldOverride
public void resetContainerFieldOverride()Warning: containerFieldOverride describes a non-default field relationship of a node to its parent, overriding the default or alternate containerField value. Programmer usage is not ordinarily needed when using this API (in rare cases it may be needed for ProtoInstance nodes). Instead of using containerFieldOverride workaround methods, focus on defining correct parent-child node relationships instead.- See Also:
-