Package com.luciad.shape.shape2D
Class TLcdLonLatFloatPolylineCache
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.shape2D.ALcd2DEditableShape
com.luciad.shape.shape2D.ALcd2DEditableFloatPolypoint
com.luciad.shape.shape2D.TLcdLonLatFloatPolyline
com.luciad.shape.shape2D.TLcdLonLatFloatPolylineCache
- All Implemented Interfaces:
ILcdBounded,ILcdCurve,ILcdPointList,ILcdPolyline,ILcdPolypoint,ILcdShape,ILcd2DEditablePointList,ILcd2DEditablePolyline,ILcd2DEditablePolypoint,ILcd2DEditableShape,ILcdCache,ILcdCloneable,Serializable,Cloneable
This class provides an implementation of
ILcd2DEditablePolyline in
the geodetic space.
Calculations are based on a spherical approximation.
It uses an array of floats instead of a TLcd2DEditablePointList
of ILcd2DEditablePoint objects. A single array of floats
stores the 2D coordinates. The points are stored as (x,y) pairs.
The boolean indicates whether the last 4 places in the array can be used
to store the bounds of the ILcd2DEditablePolyline.
This class is thread-hostile, even for read-only access, since point instances are being reused from an internal pool.
- See Also:
-
Field Summary
Fields inherited from interface com.luciad.shape.ILcdCurve
INTERPOLATION_CIRCLE_BY_3POINTS, INTERPOLATION_CIRCLE_BY_CENTERPOINT, INTERPOLATION_CIRCULARARC_BY_3POINTS, INTERPOLATION_CIRCULARARC_BY_BULGE, INTERPOLATION_CIRCULARARC_BY_CENTERPOINT, INTERPOLATION_ELLIPTICAL, INTERPOLATION_GEODESIC, INTERPOLATION_LINEAR, INTERPOLATION_MIXED, INTERPOLATION_RHUMB -
Constructor Summary
ConstructorsConstructorDescriptionTLcdLonLatFloatPolylineCache(float[] aPoints, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) TLcdLonLatFloatPolylineCache(TLcdLonLatFloatPolylineCache aLonLatFloatPolylineCache) -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.clone()Creates and returns a copy of this object, by delegating toObject.clone().getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.voidinsertIntoCache(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.protected voidremoveCachedObject(Object aKey) Looks up and removes the cached Object corresponding to the given key.Methods inherited from class com.luciad.shape.shape2D.TLcdLonLatFloatPolyline
calculateBounds, computePointSFCT, contains2D, contains2D, createBounds, createPoint, getEndPoint, getEndTangent2D, getInterpolation, getLength2D, getLineSegmentIntersectionCount, getStartPoint, getStartTangent2D, getTangent2DMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableFloatPolypoint
calculateFocusPoint, equals, getBounds, getFocusPoint, getPoint, getPointCount, hashCode, insert2DPoint, move2D, move2DPoint, removePointAt, translate2D, translate2DPointMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, move2DMethods inherited from class com.luciad.shape.ALcdShape
contains3D, fromDomainObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, removePointAt, translate2D, translate2DPointMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2DMethods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdLonLatFloatPolylineCache
public TLcdLonLatFloatPolylineCache() -
TLcdLonLatFloatPolylineCache
public TLcdLonLatFloatPolylineCache(float[] aPoints, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) -
TLcdLonLatFloatPolylineCache
-
-
Method Details
-
invalidate
protected void invalidate()- Overrides:
invalidatein classALcd2DEditableFloatPolypoint
-
insertIntoCache
Description copied from interface:ILcdCacheInserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCachein interfaceILcdCache- Parameters:
aKey- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...).aObject- the Object to be cached.
-
getCachedObject
Description copied from interface:ILcdCacheLooks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
removeCachedObject
Description copied from interface:ILcdCacheLooks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCacheClears the cache.- Specified by:
clearCachein interfaceILcdCache
-
clone
Description copied from class:ALcdShapeCreates and returns a copy of this object, by delegating toObject.clone(). Extensions should delegate to this implementation withsuper.clone(), in order to create an object instance of the right type, with all fields copied. They then should explicitly clone any non-primitive fields for which a deeper clone is required.- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classTLcdLonLatFloatPolyline- See Also:
-