Package gov.nasa.worldwind.render
Class AbstractSurfaceShape.SurfaceShapeStateKey
- java.lang.Object
-
- gov.nasa.worldwind.render.AbstractSurfaceObject.SurfaceObjectStateKey
-
- gov.nasa.worldwind.render.AbstractSurfaceShape.SurfaceShapeStateKey
-
- All Implemented Interfaces:
Cacheable
- Enclosing class:
- AbstractSurfaceShape
protected static class AbstractSurfaceShape.SurfaceShapeStateKey extends AbstractSurfaceObject.SurfaceObjectStateKey
Represents a surface shapes's current state. SurfaceShapeStateKey extendsAbstractSurfaceObject.SurfaceObjectStateKey
by adding the shape's currentShapeAttributes
and the globe's state key.SurfaceShapeStateKey uniquely identifies a surface shapes's current state exactly as SurfaceObjectStateKey does, but also distinguishes the shape's active ShapeAttributes from any previous attributes, and distinguishes between different globes via the globe state key.
-
-
Field Summary
Fields Modifier and Type Field Description protected ShapeAttributes
attributes
The SurfaceShape's attributes.protected java.lang.Object
globeStateKey
The Globe's state key.-
Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject.SurfaceObjectStateKey
modifiedTime, uniqueId
-
-
Constructor Summary
Constructors Constructor Description SurfaceShapeStateKey(long uniqueID, long modifiedTime, ShapeAttributes attributes, java.lang.Object globeStateKey)
Constructs a new SurfaceShapeStateKey with the specified unique ID, modified time, attributes, and globe state key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getSizeInBytes()
Returns the state key's size in bytes.int
hashCode()
-
-
-
Field Detail
-
attributes
protected final ShapeAttributes attributes
The SurfaceShape's attributes. May be null if the shape has no attributes.
-
globeStateKey
protected final java.lang.Object globeStateKey
The Globe's state key. May be null if the shape's state does not depend on the globe.
-
-
Constructor Detail
-
SurfaceShapeStateKey
public SurfaceShapeStateKey(long uniqueID, long modifiedTime, ShapeAttributes attributes, java.lang.Object globeStateKey)
Constructs a new SurfaceShapeStateKey with the specified unique ID, modified time, attributes, and globe state key. The globe state key should be null if the surface shape does not depend on the globe.- Parameters:
uniqueID
- the SurfaceShape's unique ID.modifiedTime
- the SurfaceShape's modified time.attributes
- the SurfaceShape's attributes, or null if the shape has no attributes.globeStateKey
- the globe's state key, or null if the shape does not depend on the globe.- See Also:
Globe.getStateKey(DrawContext)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractSurfaceObject.SurfaceObjectStateKey
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractSurfaceObject.SurfaceObjectStateKey
-
getSizeInBytes
public long getSizeInBytes()
Returns the state key's size in bytes. Overridden to include the attributes and the reference to the globe state key.- Specified by:
getSizeInBytes
in interfaceCacheable
- Overrides:
getSizeInBytes
in classAbstractSurfaceObject.SurfaceObjectStateKey
- Returns:
- The state key's size in bytes.
-
-