Package gov.nasa.worldwind.render
Class SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
- java.lang.Object
-
- gov.nasa.worldwind.render.SurfaceObjectTileBuilder.SurfaceObjectTileStateKey
-
- All Implemented Interfaces:
Cacheable
- Enclosing class:
- SurfaceObjectTileBuilder
protected static class SurfaceObjectTileBuilder.SurfaceObjectTileStateKey extends java.lang.Object implements Cacheable
Represents a surface renderable tile's current state. TileStateKey distinguishes the tile's state by comparing the individual state keys of the surface renderables intersecting the tile. This does not retain any references to the surface renderables themselves. Should the tile state key live longer than the surface renderables, the state key does not prevent those objects from being reclaimed by the garbage collector.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]
intersectingObjectKeys
protected TileKey
tileKey
-
Constructor Summary
Constructors Constructor Description SurfaceObjectTileStateKey(DrawContext dc, SurfaceObjectTileBuilder.SurfaceObjectTile tile)
Construsts a tile state key for the specified surface renderable tile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getSizeInBytes()
Returns the tile state key's size in bytes.int
hashCode()
-
-
-
Field Detail
-
tileKey
protected final TileKey tileKey
-
intersectingObjectKeys
protected final java.lang.Object[] intersectingObjectKeys
-
-
Constructor Detail
-
SurfaceObjectTileStateKey
public SurfaceObjectTileStateKey(DrawContext dc, SurfaceObjectTileBuilder.SurfaceObjectTile tile)
Construsts a tile state key for the specified surface renderable tile.- Parameters:
dc
- the draw context the state key is related to.tile
- the tile to construct a state key for.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getSizeInBytes
public long getSizeInBytes()
Returns the tile state key's size in bytes. The total size of the intersecting object keys, plus the size of the array itself. The tileKey is owned by the SurfaceObjectTile, so we don't include it in the state key's size.- Specified by:
getSizeInBytes
in interfaceCacheable
- Returns:
- The state key's size in bytes.
-
-