Package org.web3d.x3d.sai.Shape
Interface TwoSidedMaterial
- All Superinterfaces:
X3DAppearanceChildNode
,X3DMaterialNode
,X3DNode
- All Known Implementing Classes:
TwoSidedMaterial
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
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
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.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfloat
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.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named diffuseColor.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named emissiveColor.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.setAmbientIntensity
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.setBackAmbientIntensity
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backAmbientIntensity.setBackDiffuseColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backDiffuseColor.setBackEmissiveColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backEmissiveColor.setBackShininess
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backShininess.setBackSpecularColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named backSpecularColor.setBackTransparency
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named backTransparency.setDiffuseColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named diffuseColor.setEmissiveColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named emissiveColor.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.setShininess
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named shininess.setSpecularColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named specularColor.setTransparency
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named transparency.
-
Method Details
-
getAmbientIntensity
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.
- 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.
- 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).
-
getBackAmbientIntensity
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.
- 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.
- 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).
-
getBackDiffuseColor
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.
- 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.
- 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).
-
getBackEmissiveColor
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.
- 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.
- 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).
-
getBackShininess
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.
- 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.
- 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).
-
getBackSpecularColor
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.
- 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.
- 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).
-
getBackTransparency
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.
- 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.
- 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).
-
getDiffuseColor
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.
- 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.
- 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).
-
getEmissiveColor
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.
- 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.
- 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).
-
getMetadata
X3DMetadataObject getMetadata()Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- 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.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DAppearanceChildNode
- Specified by:
setMetadata
in interfaceX3DMaterialNode
- Specified by:
setMetadata
in interfaceX3DNode
- 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:
-
getSeparateBackColor
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'.
- 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'.
- 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
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.
- 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.
- 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).
-
getSpecularColor
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.
- 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.
- 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).
-
getTransparency
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.
- 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.
- 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).
-