Package com.luciad.view.lightspeed.style
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds the style with the set parameters.repeatTexture
(boolean aRepeatTexture) Specifies whether the texture map should be repeated (tiled) or not.rotateTexture
(double aAlpha) Rotates the texture.scaleTexture
(double aSX, double aSY, double aSZ) Scales the texture.texture
(RenderedImage aTexture) Specifies the image to be used as a texture map.Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or not.textureInterpolationType
(ELcdInterpolationType aInterpolationType) Specifies whether linear or nearest neighbor interpolation should be used for the texture.textureMatrix
(double[] aTextureMatrix) Specifies the 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style.textureObject
(ALsp2DTextureObject aTextureObject) Specifies the texture object to be used.translateTexture
(double aDX, double aDY, double aDZ) Translates the textures.
-
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 texturetextureObject(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 viatextureObject(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
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 imagetexture(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 viatexture(RenderedImage)
before calling this, it will be replaced by this texture.- Parameters:
aTextureObject
- the texture object.- Returns:
this
- Since:
- 2016.1
-
textureMatrix
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
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
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 thatCUBIC
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
Translates the textures.- Parameters:
aDX
- amount by which the x-coordinates of the texture are translatedaDY
- amount by which the y-coordinates of the texture are translatedaDZ
- amount by which the z-coordinates of the texture are translated- Returns:
this
-
scaleTexture
Scales the texture.- Parameters:
aSX
- amount by which the x-coordinates of the texture are scaledaSY
- amount by which the x-coordinates of the texture are scaledaSZ
- amount by which the x-coordinates of the texture are scaled- Returns:
this
-
rotateTexture
Rotates the texture.- Parameters:
aAlpha
- the amount by which the texture is rotated, in radians.- Returns:
this
-
build
ILspTexturedStyle build()Builds the style with the set parameters.- Returns:
- the resulting style
-