Class TLcdSurface
- All Implemented Interfaces:
ILcdBounded,ILcdEditableSurface,ILcdShape,ILcdSurface,ILcdCache,ILcdCloneable,Serializable,Cloneable
- Direct Known Subclasses:
TLcdDWGSurface
ILcdEditableSurface.
This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.
- Since:
- 9.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.clone()Creates and returns a copy of this object, by delegating toObject.clone().booleancontains2D(double aX, double aY) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains3D(double aX, double aY, double aZ) Checks whether thisILcdShapecontains the given point in the 3D space.booleanAn object is considered equal to this shape if it has the same class.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.Returns the exterior boundary of this surface.Returns the focus point of thisILcdShape.Returns the holes in this surface, as a list ofILcdRinginstances.inthashCode()The hash code of this shape is the hash code of its class, in order to be consistent with theALcdShape.equals(Object)method.voidinsertIntoCache(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.removeCachedObject(Object aKey) Looks up and removes the cached Object corresponding to the given key.voidsetExteriorRing(ILcdRing aRing) Sets the exterior boundary of this surface.Methods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D
-
Constructor Details
-
TLcdSurface
public TLcdSurface()
-
-
Method Details
-
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
contains2D
public boolean contains2D(double aX, double aY) Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the given point in the 2D space. Only the first two dimensions of theILcdShapeare considered.- Specified by:
contains2Din interfaceILcdShape- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
contains3D
public boolean contains3D(double aX, double aY, double aZ) Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the given point in the 3D space.- Specified by:
contains3Din interfaceILcdShape- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.aZ- the z coordinate of the point.- Returns:
- the boolean result of the containment test.
-
getBounds
Description copied from interface:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
setExteriorRing
Description copied from interface:ILcdEditableSurfaceSets the exterior boundary of this surface.Note that this implementations may throw a
ClassCastExceptionorIllegalArgumentExceptionin case the class of the ring is not compatible with the implementation of the surface. Implementations should specify in their documentation all restrictions that apply in this context.- Specified by:
setExteriorRingin interfaceILcdEditableSurface- Parameters:
aRing- the exterior boundary of this surface.
-
getExteriorRing
Description copied from interface:ILcdSurfaceReturns the exterior boundary of this surface.- Specified by:
getExteriorRingin interfaceILcdSurface- Returns:
- the exterior boundary of this surface.
-
getInteriorRings
Description copied from interface:ILcdEditableSurfaceReturns the holes in this surface, as a list ofILcdRinginstances. If there are no holes, an empty list is returned.The returned list is editable and can be used to add, remove or replace interior rings.
- Specified by:
getInteriorRingsin interfaceILcdEditableSurface- Specified by:
getInteriorRingsin interfaceILcdSurface- Returns:
- an editable list containing zero or more rings, representing the holes in this surface.
-
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 classALcdShape- See Also:
-
equals
Description copied from class:ALcdShapeAn object is considered equal to this shape if it has the same class. Extensions should refine this comparison, based on their properties. -
hashCode
public int hashCode()Description copied from class:ALcdShapeThe hash code of this shape is the hash code of its class, in order to be consistent with theALcdShape.equals(Object)method. Extensions should refine this implementation, based on their properties. -
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
-