Interface Material

All Superinterfaces:
X3DAppearanceChildNode, X3DMaterialNode, X3DNode
All Known Implementing Classes:
MaterialObject

public interface Material
extends X3DMaterialNode
Material specifies surface rendering properties for associated geometry nodes.

X3D node tooltip: [X3DMaterialNode] Material specifies surface rendering properties for associated geometry nodes. Material attributes are used by the X3D lighting equations during rendering.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification: TODO, X3D Abstract Specification: Material, X3D Tooltips: Material, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    float getAmbientIntensity()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named ambientIntensity.
    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.
    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.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float getShininess()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named shininess.
    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.
    float getTransparency()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named transparency.
    Material setAmbientIntensity​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named ambientIntensity.
    Material setDiffuseColor​(float[] newValue)
    Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named diffuseColor.
    Material setEmissiveColor​(float[] newValue)
    Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named emissiveColor.
    Material setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    Material setShininess​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named shininess.
    Material setSpecularColor​(float[] newValue)
    Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named specularColor.
    Material 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

      Material setAmbientIntensity​(float newValue)
      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:
      Material - 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

      Material setDiffuseColor​(float[] newValue)
      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:
      Material - 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

      Material setEmissiveColor​(float[] newValue)
      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:
      Material - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      Specified by:
      getMetadata in interface X3DAppearanceChildNode
      Specified by:
      getMetadata in interface X3DMaterialNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      Material setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DAppearanceChildNode
      Specified by:
      setMetadata in interface X3DMaterialNode
      Specified by:
      setMetadata in interface X3DNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      Material - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • 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

      Material setShininess​(float newValue)
      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:
      Material - 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

      Material setSpecularColor​(float[] newValue)
      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:
      Material - 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

      Material setTransparency​(float newValue)
      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:
      Material - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).