Class X3DConcreteNode

java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteNode
Direct Known Subclasses:
AnchorObject, AppearanceObject, Arc2DObject, ArcClose2DObject, AudioClipObject, BackgroundObject, BallJointObject, BillboardObject, BlendedVolumeStyleObject, BooleanFilterObject, BooleanSequencerObject, BooleanToggleObject, BooleanTriggerObject, BoundaryEnhancementVolumeStyleObject, BoundedPhysicsModelObject, BoxObject, CADAssemblyObject, CADFaceObject, CADLayerObject, CADPartObject, CartoonVolumeStyleObject, Circle2DObject, ClipPlaneObject, CollidableOffsetObject, CollidableShapeObject, CollisionCollectionObject, CollisionObject, CollisionSensorObject, CollisionSpaceObject, ColorChaserObject, ColorDamperObject, ColorInterpolatorObject, ColorObject, ColorRGBAObject, ComposedCubeMapTextureObject, ComposedShaderObject, ComposedTexture3DObject, ComposedVolumeStyleObject, ConeEmitterObject, ConeObject, ContactObject, Contour2DObject, ContourPolyline2DObject, CoordinateChaserObject, CoordinateDamperObject, CoordinateDoubleObject, CoordinateInterpolator2DObject, CoordinateInterpolatorObject, CoordinateObject, CylinderObject, CylinderSensorObject, DirectionalLightObject, DISEntityManagerObject, DISEntityTypeMappingObject, Disk2DObject, DoubleAxisHingeJointObject, EaseInEaseOutObject, EdgeEnhancementVolumeStyleObject, ElevationGridObject, EspduTransformObject, ExplosionEmitterObject, ExtrusionObject, FillPropertiesObject, FloatVertexAttributeObject, FogCoordinateObject, FogObject, FontStyleObject, ForcePhysicsModelObject, GeneratedCubeMapTextureObject, GeoCoordinateObject, GeoElevationGridObject, GeoLocationObject, GeoLODObject, GeoMetadataObject, GeoOriginObject, GeoPositionInterpolatorObject, GeoProximitySensorObject, GeoTouchSensorObject, GeoTransformObject, GeoViewpointObject, GroupObject, HAnimDisplacerObject, HAnimHumanoidObject, HAnimJointObject, HAnimMotionObject, HAnimSegmentObject, HAnimSiteObject, ImageCubeMapTextureObject, ImageTexture3DObject, ImageTextureObject, IndexedFaceSetObject, IndexedLineSetObject, IndexedQuadSetObject, IndexedTriangleFanSetObject, IndexedTriangleSetObject, IndexedTriangleStripSetObject, InlineObject, IntegerSequencerObject, IntegerTriggerObject, IsoSurfaceVolumeDataObject, KeySensorObject, LayerObject, LayerSetObject, LayoutGroupObject, LayoutLayerObject, LayoutObject, LinePickSensorObject, LinePropertiesObject, LineSetObject, LoadSensorObject, LocalFogObject, LODObject, MaterialObject, Matrix3VertexAttributeObject, Matrix4VertexAttributeObject, MetadataBooleanObject, MetadataDoubleObject, MetadataFloatObject, MetadataIntegerObject, MetadataSetObject, MetadataStringObject, MotorJointObject, MovieTextureObject, MultiTextureCoordinateObject, MultiTextureObject, MultiTextureTransformObject, NavigationInfoObject, NormalInterpolatorObject, NormalObject, NurbsCurve2DObject, NurbsCurveObject, NurbsOrientationInterpolatorObject, NurbsPatchSurfaceObject, NurbsPositionInterpolatorObject, NurbsSetObject, NurbsSurfaceInterpolatorObject, NurbsSweptSurfaceObject, NurbsSwungSurfaceObject, NurbsTextureCoordinateObject, NurbsTrimmedSurfaceObject, OpacityMapVolumeStyleObject, OrientationChaserObject, OrientationDamperObject, OrientationInterpolatorObject, OrthoViewpointObject, PackagedShaderObject, ParticleSystemObject, PickableGroupObject, PixelTexture3DObject, PixelTextureObject, PlaneSensorObject, PointEmitterObject, PointLightObject, PointPickSensorObject, PointPropertiesObject, PointSetObject, Polyline2DObject, PolylineEmitterObject, Polypoint2DObject, PositionChaser2DObject, PositionChaserObject, PositionDamper2DObject, PositionDamperObject, PositionInterpolator2DObject, PositionInterpolatorObject, PrimitivePickSensorObject, ProgramShaderObject, ProjectionVolumeStyleObject, ProtoInstanceObject, ProximitySensorObject, QuadSetObject, ReceiverPduObject, Rectangle2DObject, RigidBodyCollectionObject, RigidBodyObject, ScalarChaserObject, ScalarDamperObject, ScalarInterpolatorObject, ScreenFontStyleObject, ScreenGroupObject, ScriptObject, SegmentedVolumeDataObject, ShadedVolumeStyleObject, ShaderPartObject, ShaderProgramObject, ShapeObject, SignalPduObject, SilhouetteEnhancementVolumeStyleObject, SingleAxisHingeJointObject, SliderJointObject, SoundObject, SphereObject, SphereSensorObject, SplinePositionInterpolator2DObject, SplinePositionInterpolatorObject, SplineScalarInterpolatorObject, SpotLightObject, SquadOrientationInterpolatorObject, StaticGroupObject, StringSensorObject, SurfaceEmitterObject, SwitchObject, TexCoordChaser2DObject, TexCoordDamper2DObject, TextObject, TextureBackgroundObject, TextureCoordinate3DObject, TextureCoordinate4DObject, TextureCoordinateGeneratorObject, TextureCoordinateObject, TexturePropertiesObject, TextureTransform3DObject, TextureTransformMatrix3DObject, TextureTransformObject, TimeSensorObject, TimeTriggerObject, ToneMappedVolumeStyleObject, TouchSensorObject, TransformObject, TransformSensorObject, TransmitterPduObject, TriangleFanSetObject, TriangleSet2DObject, TriangleSetObject, TriangleStripSetObject, TwoSidedMaterialObject, UniversalJointObject, ViewpointGroupObject, ViewpointObject, ViewportObject, VisibilitySensorObject, VolumeDataObject, VolumeEmitterObject, VolumePickSensorObject, WindPhysicsModelObject, WorldInfoObject

public abstract class X3DConcreteNode
extends X3DConcreteElement
Abstract parent class for concrete X3D nodes, containing common methods and member variables.

See Also:
X3D Tooltips, X3D Scene Authoring Hints
  • Field Details

    • DEF_DEFAULT_VALUE

      public static final java.lang.String DEF_DEFAULT_VALUE
      SFString field named DEF has default value equal to an empty string.
      See Also:
      Constant Field Values
    • USE_DEFAULT_VALUE

      public static final java.lang.String USE_DEFAULT_VALUE
      SFString field named USE has default value equal to an empty string.
      See Also:
      Constant Field Values
    • CLASS_DEFAULT_VALUE

      public static final java.lang.String CLASS_DEFAULT_VALUE
      SFString field named class has default value equal to an empty string.
      See Also:
      Constant Field Values
    • containerField_ALTERNATE_VALUES

      public java.lang.String[] containerField_ALTERNATE_VALUES
      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:
      X3D Scene Authoring Hints: containerField
  • Constructor Details

  • 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:
      X3DConcreteNode, X3D Abstract Specification, Terms and definitions: node
    • 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:
      X3DConcreteStatement, CommentsBlock, X3D Abstract Specification: 7.2.5 Abstract X3D structure
    • initialize

      public void initialize()
      Initialize all member variables to default values.
    • getDEF

      public java.lang.String 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.
      Returns:
      value of DEF field
      See Also:
      X3D Scene Authoring Hints: Naming Conventions
    • getUSE

      public java.lang.String 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:
      X3D Scene Authoring Hints: Naming Conventions
    • isUSE

      public boolean isUSE()
      Utility method to indicate whether this element is 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:
      X3D Scene Authoring Hints: Naming Conventions
    • getCssClass

      public java.lang.String getCssClass()
      Provide String value from inputOutput SFString field named class.

      Tooltip: The class attribute is a space-separated list of classes, reserved for use by CSS cascading stylesheets.
      • Warning: currently the class attribute is only supported in XML encoding of X3D scenes.
      Returns:
      value of class field
      See Also:
      W3C Cascading Style Sheets
    • setConcreteDEF

      protected void setConcreteDEF​(java.lang.String newValue)
      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:
      SFStringObject.isNMTOKEN(String), X3D Tooltips: type NMTOKEN, X3D Regular Expressions (regexes)
    • setConcreteUSE

      protected final void setConcreteUSE​(java.lang.String newValue)
      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:
      SFStringObject.isNMTOKEN(String), X3D Tooltips: type NMTOKEN
    • setConcreteCssClass

      protected void setConcreteCssClass​(java.lang.String newValue)
      Protected internal superclass method to keep cssClass private, scene authors should use method setCssClass(newValue) instead. Tooltip: The class attribute is a space-separated list of classes, reserved for use by CSS cascading stylesheets. Warning: currently the class attribute is only supported in XML encoding of X3D scenes.
      Parameters:
      newValue - is new value for the cssClass field.
      See Also:
      W3C Cascading Style Sheets
    • setDEF

      public abstract X3DConcreteNode setDEF​(java.lang.String DEFlabel)
      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

      public abstract X3DConcreteNode setUSE​(java.lang.String USEname)
      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).
    • setCssClass

      public abstract X3DConcreteNode setCssClass​(java.lang.String cssClass)
      Each concrete class must independently override this abstract method to enable object-specific method pipelining. Tooltip: The class attribute is a space-separated list of classes, reserved for use by CSS cascading stylesheets.
      • Warning: currently the class attribute is only supported in XML encoding of X3D scenes.
      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:
      W3C Cascading Style Sheets
    • setMetadata

      public abstract X3DConcreteNode setMetadata​(X3DMetadataObject newValue)
      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:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      public abstract X3DConcreteNode setMetadata​(ProtoInstanceObject newValue)
      Assign X3DMetadataObject instance (using a properly typed ProtoInstanceObject) 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:
      X3D Scene Authoring Hints: Metadata Nodes
    • setIS

      public abstract X3DConcreteNode setIS​(ISObject newValue)
      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:
      X3D Tooltips: IS, X3D Tooltips: connect
    • getIS

      public abstract ISObject 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 ISObject, if any
      See Also:
      X3D Tooltips: IS, X3D Tooltips: connect
    • getContainerFieldDefault

      public abstract java.lang.String 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:
      X3D Scene Authoring Hints: containerField, StackOverflow: Why can't static methods be abstract in Java
    • getContainerFieldAlternateValues

      public java.lang.String[] getContainerFieldAlternateValues()
      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:
      X3D Scene Authoring Hints: containerField
    • getContainerFieldOverride

      public java.lang.String getContainerFieldOverride()
      containerField describes current field relationship of a node to its parent, overriding the default containerField value. Usage is not ordinarily needed when using this API.
      Returns:
      containerFieldOverride value, if any
      See Also:
      X3D Scene Authoring Hints: containerField
    • setContainerFieldOverride

      public X3DConcreteNode setContainerFieldOverride​(java.lang.String value)
      containerField describes current field relationship of a node to its parent, overriding the default containerField value. Usage is not ordinarily needed when using this API. TODO make this unnecessary for ProtoInstance usage
      Parameters:
      value - to set containerFieldOverride, must be allowed in containerField_ALTERNATE_VALUES
      Returns:
      object reference to node
      See Also:
      X3D Scene Authoring Hints: containerField
    • resetContainerFieldOverride

      public void resetContainerFieldOverride()
      containerField describes current field relationship of a node to its parent, overriding the default containerField value. Usage is not ordinarily needed when using this API.