Class TLspImageProjectionStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.layer.imageprojection.TLspImageProjectionStyle
All Implemented Interfaces:
ILspWorldElevationStyle, ILspStyler

public class TLspImageProjectionStyle extends ALspStyle implements ILspWorldElevationStyle
Style for an ILspImageProjectionLayer.

The style defines an image that should be projected onto the 3D terrain in an ILspView according to the projector.

Since:
2012.0
  • Method Details

    • newBuilder

      public static TLspImageProjectionStyle.Builder newBuilder()
      Creates a new builder for image projection styles.
      Returns:
      a new builder for image projection styles
    • asBuilder

      public TLspImageProjectionStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • isTransparent

      public boolean isTransparent()
      Always returns false, since projected images are always draped, and therefore no distinction between opaque and transparent images is needed.
      Specified by:
      isTransparent in class ALspStyle
      Returns:
      false
    • getElevationMode

      public ILspWorldElevationStyle.ElevationMode getElevationMode()
      Always returns ILspWorldElevationStyle.ElevationMode.ON_TERRAIN, since the image is projected on the terrain.
      Specified by:
      getElevationMode in interface ILspWorldElevationStyle
      Returns:
      ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
    • getProjector

      public ILspImageProjector getProjector()
      Returns the projector associated with this style. The projector's coordinates must be defined in model coordinates.
      Returns:
      an image projector
    • getImage

      public ALspTextureObject getImage()
      Returns the image to be projected onto the terrain. The image is provided in the form of an ALspTextureObject instance for the sake of efficiency. A projector could, for instance, be used to project a video feed onto the 3D terrain, in which case it would be important to avoid unnecessary data processing on the video frames. Using texture objects allows implementations to use the shortest possible path from the image source to the GPU.

      The downside to this is some additional implementation complexity: to ensure proper management of GPU memory, the returned texture object should be added to the view's ILspGLResourceCache and the styler must be prepared to recreate the image if it is evicted from the cache.

      Returns:
      the image to be projected on the terrain
    • getOpacity

      public float getOpacity()
      Returns the opacity (alpha value) of the projected image. If the image has an alpha channel itself, it is multiplied by this value.
      Returns:
      the opacity of the projected image
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle