public class TLcdLonLatHeightVariableGeoBuffer extends ALcd3DEditableShape implements ILcd3DEditableVariableGeoBuffer, ILcdCache
ILcdPolygon
).Constructor and Description |
---|
TLcdLonLatHeightVariableGeoBuffer(ILcdEllipsoid aEllipsoid)
Creates a new buffer without axis points.
|
TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis,
double[] aWidth,
double[] aHeightBelow,
double[] aHeightAbove,
ILcdEllipsoid aEllipsoid)
Creates a new buffer using the given axis, and with the given widths and heights (below and
above) for every point of the axis.
|
TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis,
double[] aWidth,
double[] aHeight,
ILcdEllipsoid aEllipsoid)
Creates a new buffer using the given axis, and with the given widths and heights for every
point of the axis.
|
TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis,
double aWidth,
double aHeight,
ILcdEllipsoid aEllipsoid)
Creates a new buffer using the given axis, and with the same given width and height for every
point of the axis.
|
TLcdLonLatHeightVariableGeoBuffer(TLcdLonLatHeightVariableGeoBuffer aBuffer)
Creates a new variable geo buffer as a copy of the given buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
Object |
clone()
Creates and returns a clone of this buffer.
|
boolean |
contains2D(double aX,
double aY)
Checks whether this buffer contains the given point in the 2D space.
|
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this buffer contains the given point in the 2D space.
|
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this buffer contains the given point in the 3D space.
|
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this buffer contains the given point in the 3D space.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
ILcd3DEditablePointList |
getBaseShape()
Returns the base polyline of the buffer.
|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
ILcdEllipsoid |
getEllipsoid()
Returns the ellipsoid on which this buffer is defined.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
double |
getHeightAbove(int aIndex)
Returns the height of this buffer above the base polyline point with the given index,
expressed in meters.
|
double |
getHeightBelow(int aIndex)
Returns the height of this buffer below the base polyline point with the given index,
expressed in meters.
|
double |
getWidth(int aIndex)
Returns the width of this buffer at the given point index, expressed in meters.
|
int |
hashCode()
Returns a hash code value for the object.
|
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
setEllipsoid(ILcdEllipsoid aEllipsoid)
Sets the ellipsoid on which this buffer is defined.
|
void |
setHeight(int aIndex,
double aHeight)
Convenience operation that sets both the buffer height above and below the given point index,
expressed in meters.
|
void |
setHeightAbove(int aIndex,
double aHeight)
Sets the height of this buffer above the base polyline point with the given index,
expressed in meters.
|
void |
setHeightBelow(int aIndex,
double aHeight)
Sets the height of this buffer below the base polyline point with the given index,
expressed in meters.
|
void |
setWidth(int aIndex,
double aWidth)
Sets the width of this buffer at the given point index, expressed in meters.
|
String |
toString()
Returns a
String representation of this object. |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate3D(double aDeltaX,
double aDeltaY,
double aDeltaZ)
Translates this
ILcd3DEditableShape from its current position over the given translation
vector in the 3D space. |
move3D, move3D
move2D, move2D
fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
move3D, move3D
move2D, move2D
public TLcdLonLatHeightVariableGeoBuffer(ILcdEllipsoid aEllipsoid)
aEllipsoid
- the ellipsoid on which this buffer is defined.public TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis, double aWidth, double aHeight, ILcdEllipsoid aEllipsoid)
getBaseShape()
does not return the same point list.aAxis
- the axis.aWidth
- the (same) width at every point of the axis.aHeight
- the (same) height at every point of the axis.aEllipsoid
- the ellipsoid on which this buffer is defined.public TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis, double[] aWidth, double[] aHeight, ILcdEllipsoid aEllipsoid)
getBaseShape()
does not return the same point list.aAxis
- the axis.aWidth
- the widths for every point of the axis. This array should have a length of
aAxis.getPointCount()
.aHeight
- the heights for every point of the axis. This array should have a length of
aAxis.getPointCount()
.aEllipsoid
- the ellipsoid on which this buffer is defined.public TLcdLonLatHeightVariableGeoBuffer(ILcdPointList aAxis, double[] aWidth, double[] aHeightBelow, double[] aHeightAbove, ILcdEllipsoid aEllipsoid)
getBaseShape()
does not return the same point list.aAxis
- the axis.aWidth
- the widths for every point of the axis. This array should have a length of
aAxis.getPointCount()
.aHeightBelow
- the height below for every point of the axis. This array should have a
length of aAxis.getPointCount()
.aHeightAbove
- the height above for every point of the axis. This array should have a
length of aAxis.getPointCount()
.aEllipsoid
- the ellipsoid on which this buffer is defined.public TLcdLonLatHeightVariableGeoBuffer(TLcdLonLatHeightVariableGeoBuffer aBuffer)
aBuffer
- a variable geo buffer.public void setEllipsoid(ILcdEllipsoid aEllipsoid)
aEllipsoid
- the ellipsoid on which this buffer is defined.public ILcdEllipsoid getEllipsoid()
public ILcd3DEditablePointList getBaseShape()
ILcdVariableGeoBuffer
getBaseShape
in interface ILcdVariableGeoBuffer
getBaseShape
in interface ILcd2DEditableVariableGeoBuffer
getBaseShape
in interface ILcd3DEditableVariableGeoBuffer
public double getWidth(int aIndex) throws IndexOutOfBoundsException
ILcdVariableGeoBuffer
getWidth
in interface ILcdVariableGeoBuffer
aIndex
- the base shape point index to return the width forIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexpublic void setWidth(int aIndex, double aWidth) throws IndexOutOfBoundsException
ILcd2DEditableVariableGeoBuffer
setWidth
in interface ILcd2DEditableVariableGeoBuffer
aIndex
- the base shape point index to set the width foraWidth
- a positive integer (width >= 0) representing the width of the buffer at the given pointIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexILcdVariableGeoBuffer.getWidth(int)
public double getHeightBelow(int aIndex) throws IndexOutOfBoundsException
ILcdVariableGeoBuffer
getHeightBelow
in interface ILcdVariableGeoBuffer
aIndex
- the base shape point index to return the height forIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexpublic void setHeightBelow(int aIndex, double aHeight) throws IndexOutOfBoundsException
ILcd3DEditableVariableGeoBuffer
setHeightBelow
in interface ILcd3DEditableVariableGeoBuffer
aIndex
- the base shape point index to set the height foraHeight
- a positive integer (>= 0) representing the distance between the respective
point and the lower side of the contour at that pointIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexpublic double getHeightAbove(int aIndex) throws IndexOutOfBoundsException
ILcdVariableGeoBuffer
getHeightAbove
in interface ILcdVariableGeoBuffer
aIndex
- the base shape point index to return the height forIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexpublic void setHeightAbove(int aIndex, double aHeight) throws IndexOutOfBoundsException
ILcd3DEditableVariableGeoBuffer
setHeightAbove
in interface ILcd3DEditableVariableGeoBuffer
aIndex
- the base shape point index to set the height foraHeight
- a positive integer (>= 0) representing the distance between the respective
point and the upper side of the contour at that pointIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexpublic void setHeight(int aIndex, double aHeight) throws IndexOutOfBoundsException
aIndex
- the base shape point index to set the height foraHeight
- a positive integer (>= 0) representing the height of the buffer above and below the given pointIndexOutOfBoundsException
- if the base polyline does not have a point for the given indexsetHeightAbove(int, double)
,
setHeightBelow(int, double)
public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
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 undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public boolean contains2D(double aX, double aY)
contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains2D(ILcdPoint aPoint)
contains2D
in interface ILcdShape
contains2D
in class ALcdShape
aPoint
- the point to testILcdShape.contains2D(double, double)
public boolean contains3D(ILcdPoint aPoint)
contains3D
in interface ILcdShape
contains3D
in class ALcdShape
aPoint
- the point to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
contains3D
in interface ILcdShape
contains3D
in class ALcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public boolean equals(Object o)
equals
in class ALcdShape
o
- the other objectObject.equals(Object)
public int hashCode()
hashCode
in class ALcdShape
Object.hashCode()
public String toString()
String
representation of this object.public Object clone()
clone
in interface ILcdCloneable
clone
in class ALcdShape
Object.clone()
public void insertIntoCache(Object aKey, Object aObject)
ILcdCache
insertIntoCache
in interface ILcdCache
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.public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public Object removeCachedObject(Object aKey)
ILcdCache
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
ILcdCache
clearCache
in interface ILcdCache