Package org.web3d.x3d.jsail.Shape
Class Appearance
java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteNode
org.web3d.x3d.jsail.Shape.Appearance
- All Implemented Interfaces:
X3DNode
,Appearance
,X3DAppearanceNode
Appearance specifies the visual properties of geometry by containing the Material, ImageTexture/MovieTexture/PixelTexture, FillProperties, LineProperties, programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) and TextureTransform nodes.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
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.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
Appearance node tooltip: [X3DAppearanceNode] Appearance specifies the visual properties of geometry by containing the Material, ImageTexture/MovieTexture/PixelTexture, FillProperties, LineProperties, programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) and TextureTransform nodes.
- Hint: insert a Shape node before adding geometry or Appearance. Interchange profile
- Hint: only Material and ImageTexture children are allowed.
- Hint: DEF/USE copies of a single node can provide a similar "look + feel" style for related shapes in a scene.
- Hint: Advanced uses can contain MultiTexture, MultiTextureTransform/TextureTransformMatrix3D/TextureTransform3D, ComposedShader/PackagedShader/ProgramShader, ComposedTexture3D/ImageTexture3D/PixelTexture3D, or ComposedCubeMapTexture/GeneratedCubeMapTexture/ImageCubeMapTexture.
- Hint: X3D Architecture 12.2.2 Appearance node https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shape.html#Appearancenode
- Hint: X3D Architecture 17.2.2 Lighting model https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/lighting.html#Lightingmodel
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AcousticProperties
SFNode field named acousticProperties has default value null (Java syntax) or NULL (XML syntax).static final float
SFFloat field named alphaCutoff has default value 0.5f (Java syntax) or 0.5 (XML syntax).static final String
Tooltip: Material transparency is applied to texture transparency.static final String
Tooltip: Blend combines partial transparency of textures and materials.static final String
SFString field named alphaMode has default value "AUTO" (Java syntax) or AUTO (XML syntax).static final String
Tooltip: Alpha-testing mode for transparent when alpha value less than 0.5 and opaque when greater than or equal to 0.5.static final String
Tooltip: Ignore alpha channel texture transparency, opaque.static final X3DMaterialNode
SFNode field named backMaterial has default value null (Java syntax) or NULL (XML syntax).static final String
String constant COMPONENT defines X3D component for the Appearance element: Shapestatic final String
containerField describes typical field relationship of a node to its parent.static final FillProperties
SFNode field named fillProperties has default value null (Java syntax) or NULL (XML syntax).static final String
fromField ROUTE name for SFNode field named acousticProperties.static final String
fromField ROUTE name for SFFloat field named alphaCutoff.static final String
fromField ROUTE name for SFString field named alphaMode.static final String
fromField ROUTE name for SFNode field named backMaterial.static final String
fromField ROUTE name for SFNode field named fillProperties.static final String
fromField ROUTE name for SFNode field named IS.static final String
fromField ROUTE name for SFNode field named lineProperties.static final String
fromField ROUTE name for SFNode field named material.static final String
fromField ROUTE name for SFNode field named metadata.static final String
fromField ROUTE name for SFNode field named pointProperties.static final String
fromField ROUTE name for MFNode field named shaders.static final String
fromField ROUTE name for SFNode field named texture.static final String
fromField ROUTE name for SFNode field named textureTransform.static final IS
SFNode field named IS has default value null (Java syntax) or NULL (XML syntax).static final int
Integer constant LEVEL provides default X3D Shape component level for this element: 1static final LineProperties
SFNode field named lineProperties has default value null (Java syntax) or NULL (XML syntax).static final X3DMaterialNode
SFNode field named material has default value null (Java syntax) or NULL (XML syntax).static final X3DMetadataObject
SFNode field named metadata has default value null (Java syntax) or NULL (XML syntax).static final String
String constant NAME provides name of this element: Appearance.static final PointProperties
SFNode field named pointProperties has default value null (Java syntax) or NULL (XML syntax).static final X3DTextureNode
SFNode field named texture has default value null (Java syntax) or NULL (XML syntax).static final X3DTextureTransformNode
SFNode field named textureTransform has default value null (Java syntax) or NULL (XML syntax).static final String
toField ROUTE name for SFNode field named acousticProperties.static final String
toField ROUTE name for SFFloat field named alphaCutoff.static final String
toField ROUTE name for SFString field named alphaMode.static final String
toField ROUTE name for SFNode field named backMaterial.static final String
toField ROUTE name for SFNode field named fillProperties.static final String
toField ROUTE name for SFNode field named lineProperties.static final String
toField ROUTE name for SFNode field named material.static final String
toField ROUTE name for SFNode field named metadata.static final String
toField ROUTE name for SFNode field named pointProperties.static final String
toField ROUTE name for MFNode field named shaders.static final String
toField ROUTE name for SFNode field named texture.static final String
toField ROUTE name for SFNode field named textureTransform.Fields inherited from class org.web3d.x3d.jsail.X3DConcreteNode
containerField_ALLOWED_VALUES, containerFieldOverride, DEF_DEFAULT_VALUE, USE_DEFAULT_VALUE
Fields inherited from class org.web3d.x3d.jsail.X3DConcreteElement
CLASS_DEFAULT_VALUE, ID_DEFAULT_VALUE, STYLE_DEFAULT_VALUE, validationResult
-
Constructor Summary
ConstructorDescriptionConstructor for Appearance to initialize member variables with default values.Appearance
(String DEFlabel) Utility constructor that assigns DEF label after initializing member variables with default values. -
Method Summary
Modifier and TypeMethodDescriptionaddComments
(String newComment) Add comment as String to contained commentsList.addComments
(String[] newComments) Add comments as String[] array to contained commentsList.addComments
(CommentsBlock newCommentsBlock) Add CommentsBlock to contained commentsList.addShaders
(ProtoInstance newValue) Add single ProtoInstance (with appropriate node type and containerField value) to MFNode array for shaders field.addShaders
(X3DNode newValue) Add single child node to existing array of shaders nodes (if any).void
addShaders
(X3DNode[] newValue) Add array of child shaders nodes to array of existing nodes (if any).Utility method to clear SFNode value of acousticProperties field.Utility method to clear SFNode value of backMaterial field.Utility method to clear SFNode value of fillProperties field.clearIS()
Utility method to clear SFNode value of IS field.Utility method to clear SFNode value of lineProperties field.Utility method to clear SFNode value of material field.Utility method to clear SFNode value of metadata field.Utility method to clear SFNode value of pointProperties field.Utility method to clear MFNode value of shaders field.Utility method to clear SFNode value of texture field.Utility method to clear SFNode value of textureTransform field.findElementByNameValue
(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.findElementByNameValue
(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.findNodeByDEF
(String DEFvalue) Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.getAccessType
(String fieldName) Indicate accessType corresponding to given fieldName.Provide org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) from inputOutput SFNode field acousticProperties.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alphaCutoff.Provide String enumeration value (baseType SFString) ["AUTO" | "OPAQUE" | "MASK" | "BLEND"] from inputOutput SFString field named alphaMode.Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field backMaterial.final String
Defines X3D component for the Appearance element: Shapefinal int
Provides default X3D component level for this element: 1final String
containerField describes typical field relationship of a node to its parent.Provide String value from inputOutput SFString field named class.Provide String value from inputOutput SFString field named style.getDEF()
Provide String value from inputOutput SFString field named DEF.final String
Provides name of this element: AppearancegetFieldType
(String fieldName) Indicate type corresponding to given fieldName.Provide org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) from inputOutput SFNode field fillProperties.Provide String value from inputOutput SFString field named id.getIS()
Provide IS instance (using a properly typed node) from inputOutput SFNode field IS.Provide org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) from inputOutput SFNode field lineProperties.Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field material.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.Provide org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) from inputOutput SFNode field pointProperties.X3DNode[]
Provide array of org.web3d.x3d.sai.Shaders.X3DShaderNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field shaders.Utility method to get ArrayList value of MFNode shaders field, similar togetShaders()
.Provide org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) from inputOutput SFNode field texture.Provide org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) from inputOutput SFNode field textureTransform.getUSE()
Provide String value from inputOutput SFString field named USE.boolean
Indicate whether an object is available for inputOutput SFNode field acousticProperties.boolean
Indicate whether an object is available for inputOutput SFNode field backMaterial.boolean
hasElementByNameValue
(String nameValue, String elementName) Recursive method to determine whether node or statement with given name attribute is found, meaning both objects are attached to same scene graph.boolean
Indicate whether an object is available for inputOutput SFNode field fillProperties.boolean
hasIS()
Indicate whether an object is available for inputOutput SFNode field IS.boolean
Indicate whether an object is available for inputOutput SFNode field lineProperties.boolean
Indicate whether an object is available for inputOutput SFNode field material.boolean
Indicate whether an object is available for inputOutput SFNode field metadata.boolean
hasNodeByDEF
(String DEFvalue) Recursive method to determine whether node with DEFvalue is found, meaning both objects are attached to same scene graph.boolean
Indicate whether an object is available for inputOutput SFNode field pointProperties.boolean
Indicate whether an object is available for inputOutput MFNode field shaders.boolean
Indicate whether an object is available for inputOutput SFNode field texture.boolean
Indicate whether an object is available for inputOutput SFNode field textureTransform.final void
Initialize all member variables to default values.setAcousticProperties
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field acousticProperties.setAcousticProperties
(AcousticProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) to inputOutput SFNode field acousticProperties.setAlphaCutoff
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetAlphaCutoff(float)
.setAlphaCutoff
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named alphaCutoff.setAlphaCutoff
(SFFloat newValue) Assign typed object value to SFFloat alphaCutoff field, similar tosetAlphaCutoff(float)
.setAlphaMode
(String newValue) Accessor method to assign String enumeration value ("AUTO" | "OPAQUE" | "MASK" | "BLEND") to inputOutput SFString field named alphaMode.setAlphaMode
(SFString newValue) Assign typed object value to SFString alphaMode field, similar tosetAlphaMode(String)
.setBackMaterial
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field backMaterial.setBackMaterial
(X3DMaterialNode newValue) Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field backMaterial.final Appearance
setCssClass
(String newValue) Accessor method to assign String value to inputOutput SFString field named class.setCssClass
(SFString newValue) Assign typed object value to SFString cssClass field, similar tosetCssClass(String)
.final Appearance
setCssStyle
(String newValue) Accessor method to assign String value to inputOutput SFString field named style.setCssStyle
(SFString newValue) Assign typed object value to SFString cssClass field, similar tosetCssStyle(String)
.final Appearance
Accessor method to assign String value to inputOutput SFString field named DEF.Assign typed object value to SFString DEF field, similar tosetDEF(String)
.setFillProperties
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field fillProperties.setFillProperties
(FillProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) to inputOutput SFNode field fillProperties.final Appearance
Accessor method to assign String value to inputOutput SFString field named id.Assign typed object value to SFString HtmlID field, similar tosetHtmlID(String)
.Accessor method to assign IS instance (using a properly typed node) to inputOutput SFNode field IS.setLineProperties
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field lineProperties.setLineProperties
(LineProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) to inputOutput SFNode field lineProperties.setMaterial
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field material.setMaterial
(X3DMaterialNode newValue) Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field material.setMetadata
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field metadata.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setPointProperties
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field pointProperties.setPointProperties
(PointProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) to inputOutput SFNode field pointProperties.setShaders
(ArrayList<X3DShaderNode> newValue) Assign ArrayList value of MFNode shaders field, similar tosetShaders(org.web3d.x3d.sai.Core.X3DNode[])
.void
setShaders
(X3DNode newValue) Set single child shaders node, replacing prior array of existing nodes (if any).setShaders
(X3DNode[] newValue) Accessor method to assign org.web3d.x3d.sai.Shaders.X3DShaderNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field shaders.setTexture
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field texture.setTexture
(X3DTextureNode newValue) Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) to inputOutput SFNode field texture.setTextureTransform
(ProtoInstance newValue) Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field textureTransform.setTextureTransform
(X3DTextureTransformNode newValue) Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) to inputOutput SFNode field textureTransform.final Appearance
Accessor method to assign String value to inputOutput SFString field named USE.Assign typed object value to SFString USE field, similar tosetUSE(String)
.setUSE
(Appearance DEFnode) Assign a USE reference to another DEF node of same node type, similar tosetUSE(String)
.toStringClassicVRML
(int indentLevel) Recursive method to provide ClassicVRML string serialization.toStringVRML97
(int indentLevel) Recursive method to provide VRML97 string serialization.toStringX3D
(int indentLevel) Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.validate()
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.Methods inherited from class org.web3d.x3d.jsail.X3DConcreteNode
getContainerFieldAllowedValues, getContainerFieldOverride, getName, hasDEF, hasNameField, hasUSE, includesNameField, isNode, isStatement, resetContainerFieldOverride, setConcreteDEF, setConcreteUSE, setContainerFieldOverride
Methods inherited from class org.web3d.x3d.jsail.X3DConcreteElement
addComments, clearParent, findAncestorElementByName, findAncestorProtoBody, findAncestorScene, findAncestorX3D, getPackageName, getParent, getValidationResult, hasAncestorElementByName, hasAncestorProtoBody, hasAncestorScene, hasAncestorX3D, hasParent, isValid, setConcreteCssClass, setConcreteCssStyle, setConcreteHtmlID, setParent, toStringClassicVRML, toStringVRML97, toStringX3D
-
Field Details
-
ALPHAMODE_AUTO
Tooltip: Material transparency is applied to texture transparency. SFString field named alphaMode with X3DUOM simpleType alphaModeChoices and with X3DUOM baseType SFString can equal this value "AUTO" (Java syntax) or AUTO (XML syntax).- See Also:
-
ALPHAMODE_OPAQUE
Tooltip: Ignore alpha channel texture transparency, opaque. SFString field named alphaMode with X3DUOM simpleType alphaModeChoices and with X3DUOM baseType SFString can equal this value "OPAQUE" (Java syntax) or OPAQUE (XML syntax).- See Also:
-
ALPHAMODE_MASK
Tooltip: Alpha-testing mode for transparent when alpha value less than 0.5 and opaque when greater than or equal to 0.5. SFString field named alphaMode with X3DUOM simpleType alphaModeChoices and with X3DUOM baseType SFString can equal this value "MASK" (Java syntax) or MASK (XML syntax).- See Also:
-
ALPHAMODE_BLEND
Tooltip: Blend combines partial transparency of textures and materials. SFString field named alphaMode with X3DUOM simpleType alphaModeChoices and with X3DUOM baseType SFString can equal this value "BLEND" (Java syntax) or BLEND (XML syntax).- See Also:
-
NAME
String constant NAME provides name of this element: Appearance.- See Also:
-
COMPONENT
String constant COMPONENT defines X3D component for the Appearance element: Shape- See Also:
-
LEVEL
public static final int LEVELInteger constant LEVEL provides default X3D Shape component level for this element: 1- See Also:
-
ACOUSTICPROPERTIES_DEFAULT_VALUE
SFNode field named acousticProperties has default value null (Java syntax) or NULL (XML syntax). -
ALPHACUTOFF_DEFAULT_VALUE
public static final float ALPHACUTOFF_DEFAULT_VALUESFFloat field named alphaCutoff has default value 0.5f (Java syntax) or 0.5 (XML syntax).- See Also:
-
ALPHAMODE_DEFAULT_VALUE
SFString field named alphaMode has default value "AUTO" (Java syntax) or AUTO (XML syntax).- See Also:
-
BACKMATERIAL_DEFAULT_VALUE
SFNode field named backMaterial has default value null (Java syntax) or NULL (XML syntax). -
FILLPROPERTIES_DEFAULT_VALUE
SFNode field named fillProperties has default value null (Java syntax) or NULL (XML syntax). -
IS_DEFAULT_VALUE
SFNode field named IS has default value null (Java syntax) or NULL (XML syntax). -
LINEPROPERTIES_DEFAULT_VALUE
SFNode field named lineProperties has default value null (Java syntax) or NULL (XML syntax). -
MATERIAL_DEFAULT_VALUE
SFNode field named material has default value null (Java syntax) or NULL (XML syntax). -
METADATA_DEFAULT_VALUE
SFNode field named metadata has default value null (Java syntax) or NULL (XML syntax). -
POINTPROPERTIES_DEFAULT_VALUE
SFNode field named pointProperties has default value null (Java syntax) or NULL (XML syntax). -
TEXTURE_DEFAULT_VALUE
SFNode field named texture has default value null (Java syntax) or NULL (XML syntax). -
TEXTURETRANSFORM_DEFAULT_VALUE
SFNode field named textureTransform has default value null (Java syntax) or NULL (XML syntax). -
containerField_DEFAULT_VALUE
containerField describes typical field relationship of a node to its parent. Usage is not ordinarily needed when using this API, this default value is provided for informational purposes only.
containerField_DEFAULT_VALUE = "appearance";
containerField_ALLOWED_VALUES = {"appearance" }; type xs:NMTOKEN- See Also:
-
fromField_ACOUSTICPROPERTIES
fromField ROUTE name for SFNode field named acousticProperties.- See Also:
-
toField_ACOUSTICPROPERTIES
toField ROUTE name for SFNode field named acousticProperties.- See Also:
-
fromField_ALPHACUTOFF
fromField ROUTE name for SFFloat field named alphaCutoff.- See Also:
-
toField_ALPHACUTOFF
toField ROUTE name for SFFloat field named alphaCutoff.- See Also:
-
fromField_ALPHAMODE
fromField ROUTE name for SFString field named alphaMode.- See Also:
-
toField_ALPHAMODE
toField ROUTE name for SFString field named alphaMode.- See Also:
-
fromField_BACKMATERIAL
fromField ROUTE name for SFNode field named backMaterial.- See Also:
-
toField_BACKMATERIAL
toField ROUTE name for SFNode field named backMaterial.- See Also:
-
fromField_FILLPROPERTIES
fromField ROUTE name for SFNode field named fillProperties.- See Also:
-
toField_FILLPROPERTIES
toField ROUTE name for SFNode field named fillProperties.- See Also:
-
fromField_IS
-
fromField_LINEPROPERTIES
fromField ROUTE name for SFNode field named lineProperties.- See Also:
-
toField_LINEPROPERTIES
toField ROUTE name for SFNode field named lineProperties.- See Also:
-
fromField_MATERIAL
fromField ROUTE name for SFNode field named material.- See Also:
-
toField_MATERIAL
toField ROUTE name for SFNode field named material.- See Also:
-
fromField_METADATA
fromField ROUTE name for SFNode field named metadata.- See Also:
-
toField_METADATA
toField ROUTE name for SFNode field named metadata.- See Also:
-
fromField_POINTPROPERTIES
fromField ROUTE name for SFNode field named pointProperties.- See Also:
-
toField_POINTPROPERTIES
toField ROUTE name for SFNode field named pointProperties.- See Also:
-
fromField_SHADERS
fromField ROUTE name for MFNode field named shaders.- See Also:
-
toField_SHADERS
toField ROUTE name for MFNode field named shaders.- See Also:
-
fromField_TEXTURE
fromField ROUTE name for SFNode field named texture.- See Also:
-
toField_TEXTURE
toField ROUTE name for SFNode field named texture.- See Also:
-
fromField_TEXTURETRANSFORM
fromField ROUTE name for SFNode field named textureTransform.- See Also:
-
toField_TEXTURETRANSFORM
toField ROUTE name for SFNode field named textureTransform.- See Also:
-
-
Constructor Details
-
Appearance
public Appearance()Constructor for Appearance to initialize member variables with default values. -
Appearance
Utility constructor that assigns DEF label after initializing member variables with default values.- Parameters:
DEFlabel
- unique DEF name for this X3D node
-
-
Method Details
-
getElementName
Provides name of this element: Appearance- Specified by:
getElementName
in classX3DConcreteElement
- Returns:
- name of this element
-
getComponent
Defines X3D component for the Appearance element: Shape- Specified by:
getComponent
in classX3DConcreteElement
- Returns:
- X3D component for this element
-
getComponentLevel
public final int getComponentLevel()Provides default X3D component level for this element: 1- Specified by:
getComponentLevel
in classX3DConcreteElement
- Returns:
- default X3D component level for this element
-
getFieldType
Indicate type corresponding to given fieldName.- Specified by:
getFieldType
in classX3DConcreteElement
- Parameters:
fieldName
- name of field in this X3D node- Returns:
- X3D type (SFvec3f etc.), otherwise ConfigurationProperties.ERROR_UNKNOWN_FIELD_TYPE if not recognized
- See Also:
-
getAccessType
Indicate accessType corresponding to given fieldName.- Specified by:
getAccessType
in classX3DConcreteElement
- Parameters:
fieldName
- name of field in this X3D node- Returns:
- X3D accessType (inputOnly etc.), otherwise ConfigurationProperties.ERROR_UNKNOWN_FIELD_ACCESSTYPE if not recognized
- See Also:
-
getContainerFieldDefault
containerField describes typical field relationship of a node to its parent. Programmer usage is not ordinarily needed when using this API, since this default value is provided for informational purposes only.- Specified by:
getContainerFieldDefault
in classX3DConcreteNode
- Returns:
- default containerField value
- See Also:
-
initialize
public final void initialize()Initialize all member variables to default values.- Overrides:
initialize
in classX3DConcreteNode
-
getAcousticProperties
Provide org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) from inputOutput SFNode field acousticProperties.- Specified by:
getAcousticProperties
in interfaceAppearance
- Returns:
- value of acousticProperties field
- See Also:
-
setAcousticProperties
Accessor method to assign org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) to inputOutput SFNode field acousticProperties.- Specified by:
setAcousticProperties
in interfaceAppearance
- Parameters:
newValue
- is new value for the acousticProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearAcousticProperties
Utility method to clear SFNode value of acousticProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setAcousticProperties
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field acousticProperties.- Parameters:
newValue
- is new value for the acousticProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasAcousticProperties
public boolean hasAcousticProperties()Indicate whether an object is available for inputOutput SFNode field acousticProperties.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getAlphaCutoff
public float getAlphaCutoff()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alphaCutoff.
Tooltip: [0,1] Threshold value used for pixel rendering either transparent or opaque, used when alphaMode="MASK".- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Specified by:
getAlphaCutoff
in interfaceAppearance
- Returns:
- value of alphaCutoff field
-
setAlphaCutoff
Accessor method to assign float value to inputOutput SFFloat field named alphaCutoff.
Tooltip: [0,1] Threshold value used for pixel rendering either transparent or opaque, used when alphaMode="MASK".- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Specified by:
setAlphaCutoff
in interfaceAppearance
- Parameters:
newValue
- is new value for the alphaCutoff field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setAlphaCutoff
Assign typed object value to SFFloat alphaCutoff field, similar tosetAlphaCutoff(float)
.- Parameters:
newValue
- is new value for the alphaCutoff field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setAlphaCutoff
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetAlphaCutoff(float)
.- Parameters:
newValue
- is new value for field- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAlphaMode
Provide String enumeration value (baseType SFString) ["AUTO" | "OPAQUE" | "MASK" | "BLEND"] from inputOutput SFString field named alphaMode.
Tooltip: Provides options for control of alpha transparency handling for textures. AUTO means Material transparency is applied to texture transparency for full backwards compatility with X3D3, OPAQUE means ignore alpha transparency to render texture as opaque, MASK means alpha-testing of pixels as fully transparent when alpha value is less than alphaCutoff and fully opaque when alpha value is greater than or equal to alphaCutoff, BLEND combines partial transparency of textures and materials.- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
Available enumeration values for string comparison:AUTO
,OPAQUE
,MASK
,BLEND
.- Specified by:
getAlphaMode
in interfaceAppearance
- Returns:
- value of alphaMode field
-
setAlphaMode
Accessor method to assign String enumeration value ("AUTO" | "OPAQUE" | "MASK" | "BLEND") to inputOutput SFString field named alphaMode.
Warning: authors can only choose from a strict list of enumeration values (AUTO
,OPAQUE
,MASK
,BLEND
).
Tooltip: Provides options for control of alpha transparency handling for textures. AUTO means Material transparency is applied to texture transparency for full backwards compatility with X3D3, OPAQUE means ignore alpha transparency to render texture as opaque, MASK means alpha-testing of pixels as fully transparent when alpha value is less than alphaCutoff and fully opaque when alpha value is greater than or equal to alphaCutoff, BLEND combines partial transparency of textures and materials.- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Specified by:
setAlphaMode
in interfaceAppearance
- Parameters:
newValue
- is new value for the alphaMode field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setAlphaMode
Assign typed object value to SFString alphaMode field, similar tosetAlphaMode(String)
.- Parameters:
newValue
- is new value for the alphaMode field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackMaterial
Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field backMaterial.- Specified by:
getBackMaterial
in interfaceAppearance
- Returns:
- value of backMaterial field
- See Also:
-
setBackMaterial
Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field backMaterial.- Specified by:
setBackMaterial
in interfaceAppearance
- Parameters:
newValue
- is new value for the backMaterial field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearBackMaterial
Utility method to clear SFNode value of backMaterial field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setBackMaterial
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field backMaterial.- Parameters:
newValue
- is new value for the backMaterial field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasBackMaterial
public boolean hasBackMaterial()Indicate whether an object is available for inputOutput SFNode field backMaterial.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getFillProperties
Provide org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) from inputOutput SFNode field fillProperties.- Specified by:
getFillProperties
in interfaceAppearance
- Returns:
- value of fillProperties field
- See Also:
-
setFillProperties
Accessor method to assign org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) to inputOutput SFNode field fillProperties.- Specified by:
setFillProperties
in interfaceAppearance
- Parameters:
newValue
- is new value for the fillProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearFillProperties
Utility method to clear SFNode value of fillProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setFillProperties
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field fillProperties.- Parameters:
newValue
- is new value for the fillProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasFillProperties
public boolean hasFillProperties()Indicate whether an object is available for inputOutput SFNode field fillProperties.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getIS
Provide IS instance (using a properly typed node) from inputOutput SFNode field IS.- Specified by:
getIS
in classX3DConcreteNode
- Returns:
- value of IS field
- See Also:
-
setIS
Accessor method to assign IS instance (using a properly typed node) to inputOutput SFNode field IS.- Specified by:
setIS
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the IS field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearIS
Utility method to clear SFNode value of IS field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
hasIS
public boolean hasIS()Indicate whether an object is available for inputOutput SFNode field IS.- Returns:
- whether a concrete statement or CommentsBlock is available.
- See Also:
-
getLineProperties
Provide org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) from inputOutput SFNode field lineProperties.- Specified by:
getLineProperties
in interfaceAppearance
- Returns:
- value of lineProperties field
- See Also:
-
setLineProperties
Accessor method to assign org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) to inputOutput SFNode field lineProperties.- Specified by:
setLineProperties
in interfaceAppearance
- Parameters:
newValue
- is new value for the lineProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearLineProperties
Utility method to clear SFNode value of lineProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setLineProperties
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field lineProperties.- Parameters:
newValue
- is new value for the lineProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasLineProperties
public boolean hasLineProperties()Indicate whether an object is available for inputOutput SFNode field lineProperties.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getMaterial
Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field material.- Specified by:
getMaterial
in interfaceAppearance
- Returns:
- value of material field
- See Also:
-
setMaterial
Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field material.- Specified by:
setMaterial
in interfaceAppearance
- Parameters:
newValue
- is new value for the material field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearMaterial
Utility method to clear SFNode value of material field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setMaterial
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field material.- Parameters:
newValue
- is new value for the material field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasMaterial
public boolean hasMaterial()Indicate whether an object is available for inputOutput SFNode field material.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getMetadata
Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.- Specified by:
getMetadata
in interfaceAppearance
- Specified by:
getMetadata
in interfaceX3DAppearanceNode
- Specified by:
getMetadata
in interfaceX3DNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.- Specified by:
setMetadata
in interfaceAppearance
- Specified by:
setMetadata
in interfaceX3DAppearanceNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearMetadata
Utility method to clear SFNode value of metadata field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setMetadata
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field metadata.- Specified by:
setMetadata
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasMetadata
public boolean hasMetadata()Indicate whether an object is available for inputOutput SFNode field metadata.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getPointProperties
Provide org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) from inputOutput SFNode field pointProperties.- Specified by:
getPointProperties
in interfaceAppearance
- Returns:
- value of pointProperties field
- See Also:
-
setPointProperties
Accessor method to assign org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) to inputOutput SFNode field pointProperties.- Specified by:
setPointProperties
in interfaceAppearance
- Parameters:
newValue
- is new value for the pointProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearPointProperties
Utility method to clear SFNode value of pointProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setPointProperties
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field pointProperties.- Parameters:
newValue
- is new value for the pointProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasPointProperties
public boolean hasPointProperties()Indicate whether an object is available for inputOutput SFNode field pointProperties.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getShaders
Provide array of org.web3d.x3d.sai.Shaders.X3DShaderNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field shaders.
Tooltip: [X3DShaderNode] Zero or more contained programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) that specify, in order of preference, author-programmed rendering characteristics.- Hint: X3D Architecture 31 Programmable shaders component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Specified by:
getShaders
in interfaceAppearance
- Returns:
- value of shaders field
- See Also:
-
getShadersList
Utility method to get ArrayList value of MFNode shaders field, similar togetShaders()
.- Returns:
- value of shaders field
-
setShaders
Accessor method to assign org.web3d.x3d.sai.Shaders.X3DShaderNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field shaders.
Tooltip: [X3DShaderNode] Zero or more contained programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) that specify, in order of preference, author-programmed rendering characteristics.- Hint: X3D Architecture 31 Programmable shaders component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Specified by:
setShaders
in interfaceAppearance
- Parameters:
newValue
- is new value for the shaders field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setShaders
Assign ArrayList value of MFNode shaders field, similar tosetShaders(org.web3d.x3d.sai.Core.X3DNode[])
.- Parameters:
newValue
- is new value for the shaders field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addShaders
Add single child node to existing array of shaders nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode and ProtoInstance.- Parameters:
newValue
- is new value to be appended the shaders field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addShaders
Add single ProtoInstance (with appropriate node type and containerField value) to MFNode array for shaders field.
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to ShaderPart and ProtoInstance.- Parameters:
newValue
- is new value to be appended the parts field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addShaders
Add array of child shaders nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Specified by:
addShaders
in interfaceAppearance
- Parameters:
newValue
- is new value array to be appended the shaders field.
-
setShaders
Set single child shaders node, replacing prior array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are restricted to X3DShaderNode.- Specified by:
setShaders
in interfaceAppearance
- Parameters:
newValue
- is new node for the shaders field (restricted to X3DShaderNode)
-
clearShaders
Utility method to clear MFNode value of shaders field. This method does not initialize withSHADERS_DEFAULT_VALUE.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
hasShaders
public boolean hasShaders()Indicate whether an object is available for inputOutput MFNode field shaders.- Returns:
- whether a properly typed node or ProtoInstance array or CommentsBlock is available.
- See Also:
-
getTexture
Provide org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) from inputOutput SFNode field texture.- Specified by:
getTexture
in interfaceAppearance
- Returns:
- value of texture field
- See Also:
-
setTexture
Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) to inputOutput SFNode field texture.- Specified by:
setTexture
in interfaceAppearance
- Parameters:
newValue
- is new value for the texture field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearTexture
Utility method to clear SFNode value of texture field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setTexture
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field texture.- Parameters:
newValue
- is new value for the texture field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasTexture
public boolean hasTexture()Indicate whether an object is available for inputOutput SFNode field texture.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
getTextureTransform
Provide org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) from inputOutput SFNode field textureTransform.- Specified by:
getTextureTransform
in interfaceAppearance
- Returns:
- value of textureTransform field
- See Also:
-
setTextureTransform
Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) to inputOutput SFNode field textureTransform.- Specified by:
setTextureTransform
in interfaceAppearance
- Parameters:
newValue
- is new value for the textureTransform field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
clearTextureTransform
Utility method to clear SFNode value of textureTransform field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
setTextureTransform
Assign ProtoInstance (using a properly typed node) to inputOutput SFNode field textureTransform.- Parameters:
newValue
- is new value for the textureTransform field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
hasTextureTransform
public boolean hasTextureTransform()Indicate whether an object is available for inputOutput SFNode field textureTransform.- Returns:
- whether a properly typed node or ProtoInstance or CommentsBlock is available.
- See Also:
-
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: X3D Scene Authoring Hints, Naming Conventions https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions
- Overrides:
getDEF
in classX3DConcreteNode
- Returns:
- value of DEF field
- See Also:
-
setDEF
Accessor method to assign String value to 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: X3D Scene Authoring Hints, Naming Conventions https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions
Note that setting the DEF value clears the USE value.- Specified by:
setDEF
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the DEF field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setDEF
Assign typed object value to SFString DEF field, similar tosetDEF(String)
.- Parameters:
newValue
- is new value for the DEF field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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: do NOT include any child nodes, a DEF attribute, or any other attribute values (except for containerField) when defining a USE attribute.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
- Overrides:
getUSE
in classX3DConcreteNode
- Returns:
- value of USE field
- See Also:
-
setUSE
Accessor method to assign String value to 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: do NOT include any child nodes, a DEF attribute, or any other attribute values (except for containerField) when defining a USE attribute.
- Warning: each USE value must match a corresponding DEF value that is defined earlier in the scene.
Note: eachUSE
node is still an independent object, with theUSE
value matching theDEF
value in the preceding object.
Warning: invoking thesetUSE()
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.- Specified by:
setUSE
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the USE field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setUSE
Assign typed object value to SFString USE field, similar tosetUSE(String)
.- Parameters:
newValue
- is new value for the USE field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCssClass
Provide String value from inputOutput SFString field named class.- Overrides:
getCssClass
in classX3DConcreteElement
- Returns:
- value of class field
- See Also:
-
setCssClass
Accessor method to assign String value to inputOutput SFString field named class.- Specified by:
setCssClass
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the class field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setCssClass
Assign typed object value to SFString cssClass field, similar tosetCssClass(String)
.- Parameters:
newValue
- is new value for the class field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getHtmlID
Provide String value from inputOutput SFString field named id.- Overrides:
getHtmlID
in classX3DConcreteElement
- Returns:
- value of id field
- See Also:
-
setHtmlID
Accessor method to assign String value to inputOutput SFString field named id.- Specified by:
setHtmlID
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the id field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setHtmlID
Assign typed object value to SFString HtmlID field, similar tosetHtmlID(String)
.- Parameters:
newValue
- is new value for the id field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCssStyle
Provide String value from inputOutput SFString field named style.- Overrides:
getCssStyle
in classX3DConcreteElement
- Returns:
- value of style field
- See Also:
-
setCssStyle
Accessor method to assign String value to inputOutput SFString field named style.- Specified by:
setCssStyle
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the style field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
setCssStyle
Assign typed object value to SFString cssClass field, similar tosetCssStyle(String)
.- Parameters:
newValue
- is new value for the style field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setUSE
Assign a USE reference to another DEF node of same node type, similar tosetUSE(String)
.
Warning: note that thesetUSE()
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:
DEFnode
- must have a DEF value defined- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addComments
Add comment as String to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newComment
- initial value- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
addComments
Add comments as String[] array to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newComments
- array of comments- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
addComments
Add CommentsBlock to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newCommentsBlock
- block of comments to add- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
toStringX3D
Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.- Specified by:
toStringX3D
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- X3D string
- See Also:
-
toStringClassicVRML
Recursive method to provide ClassicVRML string serialization.- Specified by:
toStringClassicVRML
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- ClassicVRML string
- See Also:
-
toStringVRML97
Recursive method to provide VRML97 string serialization.- Specified by:
toStringVRML97
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- VRML97 string
- See Also:
-
findElementByNameValue
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. Elements with name fields include meta, Metadata* nodes, field/fieldValue, ProtoDeclare/ExternProtoDeclare/ProtoInstance, CAD and HAnim nodes.
Warning: first start with findAncestorScene() to check entire scene graph, or findAncestorX3D() to check entire model document.
Warning: more than one element may be found that has the same name, this method does not handle that case.- Specified by:
findElementByNameValue
in classX3DConcreteElement
- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- object reference to found element, null otherwise
- See Also:
-
findElementByNameValue
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. Elements with name fields include meta, Metadata* nodes, field/fieldValue, ProtoDeclare/ExternProtoDeclare/ProtoInstance, CAD and HAnim nodes.
Warning: first start with findAncestorScene() to check entire scene graph, or findAncestorX3D() to check entire model document.
Warning: more than one element may be found that has the same name, this method does not handle that case.- Specified by:
findElementByNameValue
in classX3DConcreteElement
- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)elementName
- identifies the element of interest (meta MetadataString ProtoDeclare CADassembly ProtoInstance HAnimHumanoid etc.)- Returns:
- object reference to found element, null otherwise
- See Also:
-
hasElementByNameValue
Recursive method to determine whether node or statement with given name attribute is found, meaning both objects are attached to same scene graph.- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)elementName
- identifies the element of interest (meta MetadataString ProtoDeclare CADassembly ProtoInstance HAnimHumanoid etc.)- Returns:
- whether node is found
- See Also:
-
findNodeByDEF
Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.
Warning: first start with findAncestorScene() to check entire scene graph, or findAncestorX3D() to check entire model document.
Warning: more than one element may be found that has the same DEF, this method does not handle that case.- Specified by:
findNodeByDEF
in classX3DConcreteElement
- Parameters:
DEFvalue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- object reference to found node, null otherwise
- See Also:
-
hasNodeByDEF
Recursive method to determine whether node with DEFvalue is found, meaning both objects are attached to same scene graph.- Parameters:
DEFvalue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- whether node is found
- See Also:
-
validate
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. TODO document specific validation methods.- Specified by:
validate
in classX3DConcreteElement
- Returns:
- validation results (if any)
-