public class TLspImageProjectionStyle extends ALspStyle implements ILspWorldElevationStyle
ILspImageProjectionLayer
.
The style defines an image
that should be projected onto the 3D terrain in an
ILspView
according to the projector
.Modifier and Type | Class and Description |
---|---|
static class |
TLspImageProjectionStyle.Builder<B extends TLspImageProjectionStyle.Builder<B>>
Builder used to create image projection styles.
|
ILspWorldElevationStyle.ElevationMode
Modifier and Type | Method and Description |
---|---|
TLspImageProjectionStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object o) |
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Always returns
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN , since the image is projected on the terrain. |
ALspTextureObject |
getImage()
Returns the image to be projected onto the terrain.
|
float |
getOpacity()
Returns the opacity (alpha value) of the projected image.
|
ILspImageProjector |
getProjector()
Returns the projector associated with this style.
|
int |
hashCode() |
boolean |
isTransparent()
Always returns false, since projected images are always draped, and
therefore no distinction between opaque and transparent images is needed.
|
static TLspImageProjectionStyle.Builder |
newBuilder()
Creates a new builder for image projection styles.
|
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
public static TLspImageProjectionStyle.Builder newBuilder()
public TLspImageProjectionStyle.Builder<?> asBuilder()
public boolean isTransparent()
isTransparent
in class ALspStyle
false
public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
, since the image is projected on the terrain.getElevationMode
in interface ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
public ILspImageProjector getProjector()
public ALspTextureObject getImage()
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.public float getOpacity()