Interface ILcd3DMeshStyle

All Known Implementing Classes:
TLcd3DMeshStyle, TLcdOpenFlight3DMeshStyle

public interface ILcd3DMeshStyle
An interface that represents the visual aspects of an ILcdStyled3DMesh. This includes Blinn/Phong style material properties:
  • Ambient, diffuse, specular and emissive colors
  • A shininess exponent
It also includes a texture image which, if present, overrides the diffuse color. getTextureSourceName() returns the name of the texture image, getTextureData(ILcdInputStreamFactory) returns an input stream for the texture image. The latter by default tries to interpret the texture source name as a file path, but can for instance be overridden for file formats that embed textures in the same file as the 3D mesh data itself.

See TLcd3DMeshStyle for a default implementation.

  • Method Details

    • getAmbientColor

      Color getAmbientColor()
      Returns the ambient color of this style. If the ambient color is unknown, returns Color.BLACK.
      Returns:
      the ambient color of this style
    • getDiffuseColor

      Color getDiffuseColor()
      Returns the diffuse color of this style. If the diffuse color is unknown, returns Color.WHITE.
      Returns:
      the diffuse color of this style
    • getSpecularColor

      Color getSpecularColor()
      Returns the specular color of this style. If the specular color is unknown, returns Color.BLACK.
      Returns:
      the specular color of this style
    • getEmissiveColor

      Color getEmissiveColor()
      Returns the emissive color of this style. If the emissive color is unknown, returns Color.BLACK.
      Returns:
      the emissive color of this style
    • isTransparent

      boolean isTransparent()
      Returns true if this style is transparent.
      Returns:
      true if this style is transparent
    • getShininess

      double getShininess()
      Returns the specular exponent of this style. The value must lie between 0 and 128, inclusive. If the specular exponent is unknown, returns zero.
      Returns:
      the specular exponent of this style
    • getTextureSourceName

      String getTextureSourceName()
      Returns the path to a texture map for this style, or null if no texture is present.
      Returns:
      the path to a texture map for this style
    • getTextureData

      default InputStream getTextureData(ILcdInputStreamFactory aFactory) throws IOException
      Creates an input stream from which the texture map for this style can be decoded. By default, this method calls the supplied input stream factory with getTextureSourceName() as input. It returns null if no texture is associated with this style. Otherwise, it throws an exception if the texture file cannot be opened.
      Parameters:
      aFactory - the input stream factory to be used when opening the texture file
      Returns:
      an input stream from which the texture image can be read, or null if no texture is associated with this style
      Throws:
      IOException - if the texture file cannot be opened
      Since:
      2018.0
    • getGLTextureData

      default Object getGLTextureData()
      Return the GL texture data as an object containing all texture information.
      Returns:
      an object representing the texture data. Implementation-specific.
      Since:
      2022.0