Package org.web3d.x3d.jsail.Shape
Class TwoSidedMaterial
java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteNode
org.web3d.x3d.jsail.Shape.TwoSidedMaterial
- All Implemented Interfaces:
X3DNode
,TwoSidedMaterial
,X3DAppearanceChildNode
,X3DMaterialNode
TwoSidedMaterial specifies surface rendering properties for associated geometry nodes, for outer (front) and inner (back) sides of polygons.
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
Note that SFColor provides a variety of color constants.
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.
TwoSidedMaterial node tooltip: (X3D version 3.2 or later) [X3DMaterialNode] TwoSidedMaterial specifies surface rendering properties for associated geometry nodes, for outer (front) and inner (back) sides of polygons. Material attributes are used by the X3D lighting equations during rendering.
- Warning: requires X3D profile='Full' or else include <component name='Shape' level='4'/>
- Hint: insert Shape and Appearance nodes before adding material.
- Hint: DEF/USE copies of a single node can provide a similar "look + feel" style for related shapes in a scene.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Warning: corresponding geometry within the parent Shape must have solid='false' for two-sided rendering, otherwise no reverse-side back geometry is displayed.
- Hint: X3D Architecture 12.2.3 Two-sided materials https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shape.html#TwoSidedMaterials
- Hint: X3D Architecture 17.2.2 Lighting model https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/lighting.html#Lightingmodel
- Warning: X3D4 Architecture has deprecated TwoSidedMaterial, preferring use of child backMaterial node in parent Appearance.
Note that SFColor provides a variety of color constants.
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 float
SFFloat field named ambientIntensity has default value 0.2f (Java syntax) or 0.2 (XML syntax).static final float
SFFloat field named backAmbientIntensity has default value 0.2f (Java syntax) or 0.2 (XML syntax).static final float[]
SFColor field named backDiffuseColor has default value {0.8f,0.8f,0.8f} (Java syntax) or 0.8 0.8 0.8 (XML syntax).static final float[]
SFColor field named backEmissiveColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).static final float
SFFloat field named backShininess has default value 0.2f (Java syntax) or 0.2 (XML syntax).static final float[]
SFColor field named backSpecularColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).static final float
SFFloat field named backTransparency has default value 0f (Java syntax) or 0 (XML syntax).static final String
String constant COMPONENT defines X3D component for the TwoSidedMaterial element: Shapestatic final String
containerField describes typical field relationship of a node to its parent.static final float[]
SFColor field named diffuseColor has default value {0.8f,0.8f,0.8f} (Java syntax) or 0.8 0.8 0.8 (XML syntax).static final float[]
SFColor field named emissiveColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).static final String
fromField ROUTE name for SFFloat field named ambientIntensity.static final String
fromField ROUTE name for SFFloat field named backAmbientIntensity.static final String
fromField ROUTE name for SFColor field named backDiffuseColor.static final String
fromField ROUTE name for SFColor field named backEmissiveColor.static final String
fromField ROUTE name for SFFloat field named backShininess.static final String
fromField ROUTE name for SFColor field named backSpecularColor.static final String
fromField ROUTE name for SFFloat field named backTransparency.static final String
fromField ROUTE name for SFColor field named diffuseColor.static final String
fromField ROUTE name for SFColor field named emissiveColor.static final String
fromField ROUTE name for SFNode field named IS.static final String
fromField ROUTE name for SFNode field named metadata.static final String
fromField ROUTE name for SFBool field named separateBackColor.static final String
fromField ROUTE name for SFFloat field named shininess.static final String
fromField ROUTE name for SFColor field named specularColor.static final String
fromField ROUTE name for SFFloat field named transparency.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: 4static 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: TwoSidedMaterial.static final boolean
SFBool field named separateBackColor has default value false (Java syntax) or false (XML syntax).static final float
SFFloat field named shininess has default value 0.2f (Java syntax) or 0.2 (XML syntax).static final float[]
SFColor field named specularColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax).static final String
toField ROUTE name for SFFloat field named ambientIntensity.static final String
toField ROUTE name for SFFloat field named backAmbientIntensity.static final String
toField ROUTE name for SFColor field named backDiffuseColor.static final String
toField ROUTE name for SFColor field named backEmissiveColor.static final String
toField ROUTE name for SFFloat field named backShininess.static final String
toField ROUTE name for SFColor field named backSpecularColor.static final String
toField ROUTE name for SFFloat field named backTransparency.static final String
toField ROUTE name for SFColor field named diffuseColor.static final String
toField ROUTE name for SFColor field named emissiveColor.static final String
toField ROUTE name for SFNode field named metadata.static final String
toField ROUTE name for SFBool field named separateBackColor.static final String
toField ROUTE name for SFFloat field named shininess.static final String
toField ROUTE name for SFColor field named specularColor.static final String
toField ROUTE name for SFFloat field named transparency.static final float
SFFloat field named transparency has default value 0f (Java syntax) or 0 (XML syntax).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 TwoSidedMaterial to initialize member variables with default values.TwoSidedMaterial
(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.clearIS()
Utility method to clear SFNode value of IS field.Utility method to clear SFNode value of metadata 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.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named ambientIntensity.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backAmbientIntensity.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backDiffuseColor.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backEmissiveColor.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backShininess.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backSpecularColor.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backTransparency.final String
Defines X3D component for the TwoSidedMaterial element: Shapefinal int
Provides default X3D component level for this element: 4final 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.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named diffuseColor.final String
Provides name of this element: TwoSidedMaterialfloat[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named emissiveColor.getFieldType
(String fieldName) Indicate type corresponding to given fieldName.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.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.boolean
Provide boolean value from inputOutput SFBool field named separateBackColor.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named shininess.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named specularColor.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named transparency.getUSE()
Provide String value from inputOutput SFString field named USE.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
hasIS()
Indicate whether an object is available for inputOutput SFNode field IS.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.final void
Initialize all member variables to default values.setAmbientIntensity
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetAmbientIntensity(float)
.setAmbientIntensity
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.setAmbientIntensity
(SFFloat newValue) Assign typed object value to SFFloat ambientIntensity field, similar tosetAmbientIntensity(float)
.setBackAmbientIntensity
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackAmbientIntensity(float)
.setBackAmbientIntensity
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backAmbientIntensity.setBackAmbientIntensity
(SFFloat newValue) Assign typed object value to SFFloat backAmbientIntensity field, similar tosetBackAmbientIntensity(float)
.setBackDiffuseColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackDiffuseColor(float[])
.setBackDiffuseColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackDiffuseColor(float[])
.setBackDiffuseColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backDiffuseColor.setBackDiffuseColor
(float red, float green, float blue) Assign values to SFColor backDiffuseColor field, similar tosetBackDiffuseColor(float[])
.setBackDiffuseColor
(SFColor newValue) Assign typed object value to SFColor backDiffuseColor field, similar tosetBackDiffuseColor(float[])
.setBackEmissiveColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackEmissiveColor(float[])
.setBackEmissiveColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackEmissiveColor(float[])
.setBackEmissiveColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backEmissiveColor.setBackEmissiveColor
(float red, float green, float blue) Assign values to SFColor backEmissiveColor field, similar tosetBackEmissiveColor(float[])
.setBackEmissiveColor
(SFColor newValue) Assign typed object value to SFColor backEmissiveColor field, similar tosetBackEmissiveColor(float[])
.setBackShininess
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackShininess(float)
.setBackShininess
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backShininess.setBackShininess
(SFFloat newValue) Assign typed object value to SFFloat backShininess field, similar tosetBackShininess(float)
.setBackSpecularColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackSpecularColor(float[])
.setBackSpecularColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackSpecularColor(float[])
.setBackSpecularColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backSpecularColor.setBackSpecularColor
(float red, float green, float blue) Assign values to SFColor backSpecularColor field, similar tosetBackSpecularColor(float[])
.setBackSpecularColor
(SFColor newValue) Assign typed object value to SFColor backSpecularColor field, similar tosetBackSpecularColor(float[])
.setBackTransparency
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackTransparency(float)
.setBackTransparency
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backTransparency.setBackTransparency
(SFFloat newValue) Assign typed object value to SFFloat backTransparency field, similar tosetBackTransparency(float)
.final TwoSidedMaterial
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 TwoSidedMaterial
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 TwoSidedMaterial
Accessor method to assign String value to inputOutput SFString field named DEF.Assign typed object value to SFString DEF field, similar tosetDEF(String)
.setDiffuseColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetDiffuseColor(float[])
.setDiffuseColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetDiffuseColor(float[])
.setDiffuseColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named diffuseColor.setDiffuseColor
(float red, float green, float blue) Assign values to SFColor diffuseColor field, similar tosetDiffuseColor(float[])
.setDiffuseColor
(SFColor newValue) Assign typed object value to SFColor diffuseColor field, similar tosetDiffuseColor(float[])
.setEmissiveColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetEmissiveColor(float[])
.setEmissiveColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetEmissiveColor(float[])
.setEmissiveColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named emissiveColor.setEmissiveColor
(float red, float green, float blue) Assign values to SFColor emissiveColor field, similar tosetEmissiveColor(float[])
.setEmissiveColor
(SFColor newValue) Assign typed object value to SFColor emissiveColor field, similar tosetEmissiveColor(float[])
.final TwoSidedMaterial
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.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.setSeparateBackColor
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named separateBackColor.setSeparateBackColor
(SFBool newValue) Assign typed object value to SFBool separateBackColor field, similar tosetSeparateBackColor(boolean)
.setShininess
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetShininess(float)
.setShininess
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named shininess.setShininess
(SFFloat newValue) Assign typed object value to SFFloat shininess field, similar tosetShininess(float)
.setSpecularColor
(double[] newArray) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetSpecularColor(float[])
.setSpecularColor
(double red, double green, double blue) Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetSpecularColor(float[])
.setSpecularColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named specularColor.setSpecularColor
(float red, float green, float blue) Assign values to SFColor specularColor field, similar tosetSpecularColor(float[])
.setSpecularColor
(SFColor newValue) Assign typed object value to SFColor specularColor field, similar tosetSpecularColor(float[])
.setTransparency
(double newValue) Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetTransparency(float)
.setTransparency
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named transparency.setTransparency
(SFFloat newValue) Assign typed object value to SFFloat transparency field, similar tosetTransparency(float)
.final TwoSidedMaterial
Accessor method to assign String value to inputOutput SFString field named USE.Assign typed object value to SFString USE field, similar tosetUSE(String)
.setUSE
(TwoSidedMaterial 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
-
NAME
String constant NAME provides name of this element: TwoSidedMaterial.- See Also:
-
COMPONENT
String constant COMPONENT defines X3D component for the TwoSidedMaterial element: Shape- See Also:
-
LEVEL
public static final int LEVELInteger constant LEVEL provides default X3D Shape component level for this element: 4- See Also:
-
AMBIENTINTENSITY_DEFAULT_VALUE
public static final float AMBIENTINTENSITY_DEFAULT_VALUESFFloat field named ambientIntensity has default value 0.2f (Java syntax) or 0.2 (XML syntax).- See Also:
-
BACKAMBIENTINTENSITY_DEFAULT_VALUE
public static final float BACKAMBIENTINTENSITY_DEFAULT_VALUESFFloat field named backAmbientIntensity has default value 0.2f (Java syntax) or 0.2 (XML syntax).- See Also:
-
BACKDIFFUSECOLOR_DEFAULT_VALUE
public static final float[] BACKDIFFUSECOLOR_DEFAULT_VALUESFColor field named backDiffuseColor has default value {0.8f,0.8f,0.8f} (Java syntax) or 0.8 0.8 0.8 (XML syntax). -
BACKEMISSIVECOLOR_DEFAULT_VALUE
public static final float[] BACKEMISSIVECOLOR_DEFAULT_VALUESFColor field named backEmissiveColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax). -
BACKSHININESS_DEFAULT_VALUE
public static final float BACKSHININESS_DEFAULT_VALUESFFloat field named backShininess has default value 0.2f (Java syntax) or 0.2 (XML syntax).- See Also:
-
BACKSPECULARCOLOR_DEFAULT_VALUE
public static final float[] BACKSPECULARCOLOR_DEFAULT_VALUESFColor field named backSpecularColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax). -
BACKTRANSPARENCY_DEFAULT_VALUE
public static final float BACKTRANSPARENCY_DEFAULT_VALUESFFloat field named backTransparency has default value 0f (Java syntax) or 0 (XML syntax).- See Also:
-
DIFFUSECOLOR_DEFAULT_VALUE
public static final float[] DIFFUSECOLOR_DEFAULT_VALUESFColor field named diffuseColor has default value {0.8f,0.8f,0.8f} (Java syntax) or 0.8 0.8 0.8 (XML syntax). -
EMISSIVECOLOR_DEFAULT_VALUE
public static final float[] EMISSIVECOLOR_DEFAULT_VALUESFColor field named emissiveColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax). -
IS_DEFAULT_VALUE
SFNode field named IS 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). -
SEPARATEBACKCOLOR_DEFAULT_VALUE
public static final boolean SEPARATEBACKCOLOR_DEFAULT_VALUESFBool field named separateBackColor has default value false (Java syntax) or false (XML syntax).- See Also:
-
SHININESS_DEFAULT_VALUE
public static final float SHININESS_DEFAULT_VALUESFFloat field named shininess has default value 0.2f (Java syntax) or 0.2 (XML syntax).- See Also:
-
SPECULARCOLOR_DEFAULT_VALUE
public static final float[] SPECULARCOLOR_DEFAULT_VALUESFColor field named specularColor has default value {0f,0f,0f} (Java syntax) or 0 0 0 (XML syntax). -
TRANSPARENCY_DEFAULT_VALUE
public static final float TRANSPARENCY_DEFAULT_VALUESFFloat field named transparency has default value 0f (Java syntax) or 0 (XML syntax).- See Also:
-
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 = "material";
containerField_ALLOWED_VALUES = {"material" }; type xs:NMTOKEN- See Also:
-
fromField_AMBIENTINTENSITY
fromField ROUTE name for SFFloat field named ambientIntensity.- See Also:
-
toField_AMBIENTINTENSITY
toField ROUTE name for SFFloat field named ambientIntensity.- See Also:
-
fromField_BACKAMBIENTINTENSITY
fromField ROUTE name for SFFloat field named backAmbientIntensity.- See Also:
-
toField_BACKAMBIENTINTENSITY
toField ROUTE name for SFFloat field named backAmbientIntensity.- See Also:
-
fromField_BACKDIFFUSECOLOR
fromField ROUTE name for SFColor field named backDiffuseColor.- See Also:
-
toField_BACKDIFFUSECOLOR
toField ROUTE name for SFColor field named backDiffuseColor.- See Also:
-
fromField_BACKEMISSIVECOLOR
fromField ROUTE name for SFColor field named backEmissiveColor.- See Also:
-
toField_BACKEMISSIVECOLOR
toField ROUTE name for SFColor field named backEmissiveColor.- See Also:
-
fromField_BACKSHININESS
fromField ROUTE name for SFFloat field named backShininess.- See Also:
-
toField_BACKSHININESS
toField ROUTE name for SFFloat field named backShininess.- See Also:
-
fromField_BACKSPECULARCOLOR
fromField ROUTE name for SFColor field named backSpecularColor.- See Also:
-
toField_BACKSPECULARCOLOR
toField ROUTE name for SFColor field named backSpecularColor.- See Also:
-
fromField_BACKTRANSPARENCY
fromField ROUTE name for SFFloat field named backTransparency.- See Also:
-
toField_BACKTRANSPARENCY
toField ROUTE name for SFFloat field named backTransparency.- See Also:
-
fromField_DIFFUSECOLOR
fromField ROUTE name for SFColor field named diffuseColor.- See Also:
-
toField_DIFFUSECOLOR
toField ROUTE name for SFColor field named diffuseColor.- See Also:
-
fromField_EMISSIVECOLOR
fromField ROUTE name for SFColor field named emissiveColor.- See Also:
-
toField_EMISSIVECOLOR
toField ROUTE name for SFColor field named emissiveColor.- See Also:
-
fromField_IS
-
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_SEPARATEBACKCOLOR
fromField ROUTE name for SFBool field named separateBackColor.- See Also:
-
toField_SEPARATEBACKCOLOR
toField ROUTE name for SFBool field named separateBackColor.- See Also:
-
fromField_SHININESS
fromField ROUTE name for SFFloat field named shininess.- See Also:
-
toField_SHININESS
toField ROUTE name for SFFloat field named shininess.- See Also:
-
fromField_SPECULARCOLOR
fromField ROUTE name for SFColor field named specularColor.- See Also:
-
toField_SPECULARCOLOR
toField ROUTE name for SFColor field named specularColor.- See Also:
-
fromField_TRANSPARENCY
fromField ROUTE name for SFFloat field named transparency.- See Also:
-
toField_TRANSPARENCY
toField ROUTE name for SFFloat field named transparency.- See Also:
-
-
Constructor Details
-
TwoSidedMaterial
public TwoSidedMaterial()Constructor for TwoSidedMaterial to initialize member variables with default values. -
TwoSidedMaterial
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: TwoSidedMaterial- Specified by:
getElementName
in classX3DConcreteElement
- Returns:
- name of this element
-
getComponent
Defines X3D component for the TwoSidedMaterial 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: 4- 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
-
getAmbientIntensity
public float getAmbientIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named ambientIntensity.
Tooltip: [0,1] how much ambient omnidirectional light is reflected from all light sources. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getAmbientIntensity
in interfaceTwoSidedMaterial
- Returns:
- value of ambientIntensity field
-
setAmbientIntensity
Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.
Tooltip: [0,1] how much ambient omnidirectional light is reflected from all light sources. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setAmbientIntensity
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the ambientIntensity field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setAmbientIntensity
Assign typed object value to SFFloat ambientIntensity field, similar tosetAmbientIntensity(float)
.- Parameters:
newValue
- is new value for the ambientIntensity field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setAmbientIntensity
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetAmbientIntensity(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackAmbientIntensity
public float getBackAmbientIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backAmbientIntensity.
Tooltip: [0,1] how much ambient omnidirectional light is reflected from all light sources. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getBackAmbientIntensity
in interfaceTwoSidedMaterial
- Returns:
- value of backAmbientIntensity field
-
setBackAmbientIntensity
Accessor method to assign float value to inputOutput SFFloat field named backAmbientIntensity.
Tooltip: [0,1] how much ambient omnidirectional light is reflected from all light sources. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setBackAmbientIntensity
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backAmbientIntensity field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackAmbientIntensity
Assign typed object value to SFFloat backAmbientIntensity field, similar tosetBackAmbientIntensity(float)
.- Parameters:
newValue
- is new value for the backAmbientIntensity field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackAmbientIntensity
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackAmbientIntensity(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackDiffuseColor
public float[] getBackDiffuseColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backDiffuseColor.
Tooltip: [0,1] how much direct, angle-dependent light is reflected from all light sources.- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Specified by:
getBackDiffuseColor
in interfaceTwoSidedMaterial
- Returns:
- value of backDiffuseColor field
-
setBackDiffuseColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backDiffuseColor.
Tooltip: [0,1] how much direct, angle-dependent light is reflected from all light sources.- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Specified by:
setBackDiffuseColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backDiffuseColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackDiffuseColor
Assign typed object value to SFColor backDiffuseColor field, similar tosetBackDiffuseColor(float[])
.- Parameters:
newValue
- is new value for the backDiffuseColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackDiffuseColor
Assign values to SFColor backDiffuseColor field, similar tosetBackDiffuseColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackDiffuseColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackDiffuseColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackDiffuseColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackDiffuseColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackEmissiveColor
public float[] getBackEmissiveColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backEmissiveColor.
Tooltip: [0,1] how much glowing light is emitted from this object.- Hint: emissiveColors glow even when all lights are off.
- Hint: reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Warning: bright emissiveColor values can wash out other colors and some textures.
- Specified by:
getBackEmissiveColor
in interfaceTwoSidedMaterial
- Returns:
- value of backEmissiveColor field
-
setBackEmissiveColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backEmissiveColor.
Tooltip: [0,1] how much glowing light is emitted from this object.- Hint: emissiveColors glow even when all lights are off.
- Hint: reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Warning: bright emissiveColor values can wash out other colors and some textures.
- Specified by:
setBackEmissiveColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backEmissiveColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackEmissiveColor
Assign typed object value to SFColor backEmissiveColor field, similar tosetBackEmissiveColor(float[])
.- Parameters:
newValue
- is new value for the backEmissiveColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackEmissiveColor
Assign values to SFColor backEmissiveColor field, similar tosetBackEmissiveColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackEmissiveColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackEmissiveColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackEmissiveColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackEmissiveColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackShininess
public float getBackShininess()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backShininess.
Tooltip: [0,1] Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getBackShininess
in interfaceTwoSidedMaterial
- Returns:
- value of backShininess field
-
setBackShininess
Accessor method to assign float value to inputOutput SFFloat field named backShininess.
Tooltip: [0,1] Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setBackShininess
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backShininess field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackShininess
Assign typed object value to SFFloat backShininess field, similar tosetBackShininess(float)
.- Parameters:
newValue
- is new value for the backShininess field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackShininess
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackShininess(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackSpecularColor
public float[] getBackSpecularColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named backSpecularColor.
Tooltip: [0,1] specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getBackSpecularColor
in interfaceTwoSidedMaterial
- Returns:
- value of backSpecularColor field
-
setBackSpecularColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backSpecularColor.
Tooltip: [0,1] specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setBackSpecularColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backSpecularColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackSpecularColor
Assign typed object value to SFColor backSpecularColor field, similar tosetBackSpecularColor(float[])
.- Parameters:
newValue
- is new value for the backSpecularColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackSpecularColor
Assign values to SFColor backSpecularColor field, similar tosetBackSpecularColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackSpecularColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackSpecularColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackSpecularColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetBackSpecularColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackTransparency
public float getBackTransparency()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named backTransparency.
Tooltip: [0,1] how "clear" an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile- Hint: transparency < .5 opaque, transparency > .5 transparent.
- Specified by:
getBackTransparency
in interfaceTwoSidedMaterial
- Returns:
- value of backTransparency field
-
setBackTransparency
Accessor method to assign float value to inputOutput SFFloat field named backTransparency.
Tooltip: [0,1] how "clear" an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile- Hint: transparency < .5 opaque, transparency > .5 transparent.
- Specified by:
setBackTransparency
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the backTransparency field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackTransparency
Assign typed object value to SFFloat backTransparency field, similar tosetBackTransparency(float)
.- Parameters:
newValue
- is new value for the backTransparency field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setBackTransparency
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetBackTransparency(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDiffuseColor
public float[] getDiffuseColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named diffuseColor.
Tooltip: [0,1] how much direct, angle-dependent light is reflected from all light sources.- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Specified by:
getDiffuseColor
in interfaceTwoSidedMaterial
- Returns:
- value of diffuseColor field
-
setDiffuseColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named diffuseColor.
Tooltip: [0,1] how much direct, angle-dependent light is reflected from all light sources.- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Specified by:
setDiffuseColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the diffuseColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setDiffuseColor
Assign typed object value to SFColor diffuseColor field, similar tosetDiffuseColor(float[])
.- Parameters:
newValue
- is new value for the diffuseColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setDiffuseColor
Assign values to SFColor diffuseColor field, similar tosetDiffuseColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setDiffuseColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetDiffuseColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setDiffuseColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetDiffuseColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEmissiveColor
public float[] getEmissiveColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named emissiveColor.
Tooltip: [0,1] how much glowing light is emitted from this object.- Hint: emissiveColors glow even when all lights are off.
- Hint: reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Warning: bright emissiveColor values can wash out other colors and some textures.
- Specified by:
getEmissiveColor
in interfaceTwoSidedMaterial
- Returns:
- value of emissiveColor field
-
setEmissiveColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named emissiveColor.
Tooltip: [0,1] how much glowing light is emitted from this object.- Hint: emissiveColors glow even when all lights are off.
- Hint: reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
- Hint: only emissiveColor affects IndexedLineSet, LineSet and PointSet.
- Warning: bright emissiveColor values can wash out other colors and some textures.
- Specified by:
setEmissiveColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the emissiveColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setEmissiveColor
Assign typed object value to SFColor emissiveColor field, similar tosetEmissiveColor(float[])
.- Parameters:
newValue
- is new value for the emissiveColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setEmissiveColor
Assign values to SFColor emissiveColor field, similar tosetEmissiveColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setEmissiveColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetEmissiveColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setEmissiveColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetEmissiveColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
-
getMetadata
Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.- Specified by:
getMetadata
in interfaceTwoSidedMaterial
- Specified by:
getMetadata
in interfaceX3DAppearanceChildNode
- Specified by:
getMetadata
in interfaceX3DMaterialNode
- 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 interfaceTwoSidedMaterial
- Specified by:
setMetadata
in interfaceX3DAppearanceChildNode
- Specified by:
setMetadata
in interfaceX3DMaterialNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in classX3DConcreteNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
-
getSeparateBackColor
public boolean getSeparateBackColor()Provide boolean value from inputOutput SFBool field named separateBackColor.
Tooltip: separateBackColor determines whether separate Material values are used for back faces.- Warning: backface Material values are ignored unless you set separateBackColor='true'.
- Specified by:
getSeparateBackColor
in interfaceTwoSidedMaterial
- Returns:
- value of separateBackColor field
-
setSeparateBackColor
Accessor method to assign boolean value to inputOutput SFBool field named separateBackColor.
Tooltip: separateBackColor determines whether separate Material values are used for back faces.- Warning: backface Material values are ignored unless you set separateBackColor='true'.
- Specified by:
setSeparateBackColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the separateBackColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setSeparateBackColor
Assign typed object value to SFBool separateBackColor field, similar tosetSeparateBackColor(boolean)
.- Parameters:
newValue
- is new value for the separateBackColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getShininess
public float getShininess()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named shininess.
Tooltip: [0,1] Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getShininess
in interfaceTwoSidedMaterial
- Returns:
- value of shininess field
-
setShininess
Accessor method to assign float value to inputOutput SFFloat field named shininess.
Tooltip: [0,1] Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setShininess
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the shininess field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setShininess
Assign typed object value to SFFloat shininess field, similar tosetShininess(float)
.- Parameters:
newValue
- is new value for the shininess field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setShininess
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetShininess(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSpecularColor
public float[] getSpecularColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named specularColor.
Tooltip: [0,1] specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
getSpecularColor
in interfaceTwoSidedMaterial
- Returns:
- value of specularColor field
-
setSpecularColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named specularColor.
Tooltip: [0,1] specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile- Hint: this field may be ignored, applying the default value regardless.
- Specified by:
setSpecularColor
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the specularColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setSpecularColor
Assign typed object value to SFColor specularColor field, similar tosetSpecularColor(float[])
.- Parameters:
newValue
- is new value for the specularColor field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setSpecularColor
Assign values to SFColor specularColor field, similar tosetSpecularColor(float[])
.- Parameters:
red
- first componentgreen
- second componentblue
- third component- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setSpecularColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetSpecularColor(float[])
.- Parameters:
red
- first component [0..1]green
- second component [0..1]blue
- third component [0..1]- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setSpecularColor
Utility method: double-precision set-parameters accessor for X3D floating-point type, similar tosetSpecularColor(float[])
.- Parameters:
newArray
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTransparency
public float getTransparency()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named transparency.
Tooltip: [0,1] how "clear" an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile- Hint: transparency < .5 opaque, transparency > .5 transparent.
- Specified by:
getTransparency
in interfaceTwoSidedMaterial
- Returns:
- value of transparency field
-
setTransparency
Accessor method to assign float value to inputOutput SFFloat field named transparency.
Tooltip: [0,1] how "clear" an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile- Hint: transparency < .5 opaque, transparency > .5 transparent.
- Specified by:
setTransparency
in interfaceTwoSidedMaterial
- Parameters:
newValue
- is new value for the transparency field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setTransparency
Assign typed object value to SFFloat transparency field, similar tosetTransparency(float)
.- Parameters:
newValue
- is new value for the transparency field.- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setTransparency
Utility method: double-precision set-parameter accessor for X3D floating-point type, similar tosetTransparency(float)
.- Parameters:
newValue
- is new value for field- Returns:
TwoSidedMaterial
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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:
TwoSidedMaterial
- 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)
-