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 extends AbstractSurfaceObject.SurfaceObjectStateKey by adding the shape's current ShapeAttributes 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.
attributes
protected final ShapeAttributes attributes
- The SurfaceShape's attributes. May be null if the shape has no attributes.
globeStateKey
protected final Object globeStateKey
- The Globe's state key. May be null if the shape's state does not depend on the globe.
AbstractSurfaceShape.SurfaceShapeStateKey
public AbstractSurfaceShape.SurfaceShapeStateKey(long uniqueID,
long modifiedTime,
ShapeAttributes attributes,
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)
equals
public boolean equals(Object o)
- Overrides:
equals in class AbstractSurfaceObject.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 interface Cacheable- Overrides:
getSizeInBytes in class AbstractSurfaceObject.SurfaceObjectStateKey
- Returns:
- The state key's size in bytes.
hashCode
public int hashCode()
- Overrides:
hashCode in class AbstractSurfaceObject.SurfaceObjectStateKey