Interface ILspTexturedStyle.Builder

All Known Implementing Classes:
TLspFillStyle.Builder, TLspLineStyle.Builder, TLspPinLineStyle.Builder
Enclosing interface:
ILspTexturedStyle

public static interface ILspTexturedStyle.Builder
Builder for textured styles.
Since:
2012.0
  • Method Details

    • texture

      Specifies the image to be used as a texture map. A new texture will be created for the specified image. For reusing an existing texture textureObject(ALsp2DTextureObject) can be used.

      This image should never be modified. To change the texture you should create a new style with a different image instance.

      If a texture object was set via textureObject(ALsp2DTextureObject) before calling this, it will be replaced by a texture created from the image.

      Parameters:
      aTexture - the image to be used as a texture map
      Returns:
      this
      Since:
      2016.1
    • textureObject

      ILspTexturedStyle.Builder textureObject(ALsp2DTextureObject aTextureObject)
      Specifies the texture object to be used. This can be used to reuse already existing textures. When a new texture needs to be created for an image texture(RenderedImage) can be used.

      To change the texture you should create a new style with a different texture object instance.

      If an image to be used as a texture was set via texture(RenderedImage) before calling this, it will be replaced by this texture.

      Parameters:
      aTextureObject - the texture object.
      Returns:
      this
      Since:
      2016.1
    • textureMatrix

      ILspTexturedStyle.Builder textureMatrix(double[] aTextureMatrix)
      Specifies the 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style. This can be used to scale, rotate or otherwise transform the texture.

      This matrix will override any previously set transformation. This interface also provides a number of convenience methods to specify common texture coordinate transformations.

      Parameters:
      aTextureMatrix - Specifies the 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style
      Returns:
      this
      See Also:
    • repeatTexture

      ILspTexturedStyle.Builder repeatTexture(boolean aRepeatTexture)
      Specifies whether the texture map should be repeated (tiled) or not.
      Parameters:
      aRepeatTexture - whether the texture map should be repeated (tiled) or not
      Returns:
      this
    • textureInterpolationType

      ILspTexturedStyle.Builder textureInterpolationType(ELcdInterpolationType aInterpolationType)
      Specifies whether linear or nearest neighbor interpolation should be used for the texture. The default is linear.
      Parameters:
      aInterpolationType - the interpolation method to use for the texture (note that CUBIC is not currently supported)
      Returns:
      this
    • textureCoordinatesMode

      Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or not. In the former case, the map is scaled and offset such that it fills the bounds (in model coordinates) of the object. In the latter case, the model coordinates of the object are used as texture coordinates unmodified.
      Parameters:
      aMode - specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or correspond to the object's model coordinates.
      Returns:
      this
    • translateTexture

      ILspTexturedStyle.Builder translateTexture(double aDX, double aDY, double aDZ)
      Translates the textures.
      Parameters:
      aDX - amount by which the x-coordinates of the texture are translated
      aDY - amount by which the y-coordinates of the texture are translated
      aDZ - amount by which the z-coordinates of the texture are translated
      Returns:
      this
    • scaleTexture

      ILspTexturedStyle.Builder scaleTexture(double aSX, double aSY, double aSZ)
      Scales the texture.
      Parameters:
      aSX - amount by which the x-coordinates of the texture are scaled
      aSY - amount by which the x-coordinates of the texture are scaled
      aSZ - amount by which the x-coordinates of the texture are scaled
      Returns:
      this
    • rotateTexture

      ILspTexturedStyle.Builder rotateTexture(double aAlpha)
      Rotates the texture.
      Parameters:
      aAlpha - the amount by which the texture is rotated, in radians.
      Returns:
      this
    • build

      Builds the style with the set parameters.
      Returns:
      the resulting style