public class TLcdLonLatHeight3DArcBand extends ALcd3DEditableShape
ILcd3DEditableArcBand
in the geodetic space.
In addition to the properties defined by ILcd3DEditableArcBand
, a TLcdLonLatHeightArcBand
has an ellipsoid on which it lives.
Refer to the documentation of ILcd3DArcBand
for the documentation of all the
different angles and other properties.
It implements ILcdCache
, thus providing a cache
to store expensive calculations, e.g. for painters,
to store model-world transformations. The cache is cleared whenever the shape is modified.
All longitude/latitude coordinates are expressed in degrees. Lengths are expressed in meters.
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.
Constructor and Description |
---|
TLcdLonLatHeight3DArcBand()
Constructs a new
TLcdLonLatHeightArcBand with all coordinates, angles and axis set to 0,
and with a default ellipsoid. |
TLcdLonLatHeight3DArcBand(double aCenterLon,
double aCenterLat,
double aCenterHeight,
double aMinRadius,
double aMaxRadius,
double aStartAngle,
double aArcAngle,
double aPitchStartAngle,
double aPitchArcAngle,
double aAxisYaw,
double aAxisPitch,
ILcdEllipsoid aEllipsoid)
Constructs a new
TLcdLonLatHeightArcBand with the given parameters. |
TLcdLonLatHeight3DArcBand(ILcdPoint aCenter,
double aMinRadius,
double aMaxRadius,
double aStartAngle,
double aArcAngle,
double aPitchStartAngle,
double aPitchArcAngle,
double aAxisYaw,
double aAxisPitch)
Constructs a new
TLcdLonLatHeightArcBand with the given parameters. |
TLcdLonLatHeight3DArcBand(ILcdPoint aCenter,
double aMinRadius,
double aMaxRadius,
double aStartAngle,
double aArcAngle,
double aPitchStartAngle,
double aPitchArcAngle,
double aAxisYaw,
double aAxisPitch,
ILcdEllipsoid aEllipsoid)
Constructs a new
TLcdLonLatHeightArcBand with the given parameters. |
TLcdLonLatHeight3DArcBand(TLcdLonLatHeight3DArcBand aLonLatHeightArcBand)
Constructs a new
TLcdLonLatHeightArcBand that is a copy of the given TLcdLonLatHeightArcBand . |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
Object |
clone()
Creates and returns a copy of this object.
|
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Provides an approximate default implementation of the 3D containment test
based on the 2D containment test.
|
boolean |
equals(Object o)
Returns whether the given object has the same class and the same
coordinates and parameters.
|
double |
getArcAngle()
Returns the angle over which this
ILcd3DArcBand extends (in degrees). |
double |
getAxisPitch()
Returns the pitch angle of (the axis of) this
ILcd3DArcBand (in degrees). |
double |
getAxisYaw()
Returns the yaw angle of (the axis of) this
ILcd3DArcBand (in degrees). |
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.
|
ILcdPoint |
getCenter()
Returns the center point of this
ILcd3DArcBand . |
ILcdEllipsoid |
getEllipsoid()
Returns the ellipsoid of this
TLcdLonLatHeightArcBand . |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
double |
getMaxRadius()
Returns the maximum radius of this
ILcd3DArcBand . |
double |
getMinRadius()
Returns the minimum radius of this
ILcd3DArcBand . |
double |
getPitchArcAngle()
Returns the angle over which the pitch of this
ILcd3DArcBand extends (in degrees). |
double |
getPitchStartAngle()
Returns the start angle of the pitch of this
ILcd3DArcBand (in degrees). |
double |
getStartAngle()
Returns the start angle of this
ILcd3DArcBand (in degrees). |
int |
hashCode()
The hash code of this shape is the hash code of its class, in order to
be consistent with the
ALcdShape.equals(Object) method. |
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
void |
move2D(double x,
double y)
Translates this shape so that its focus point ends up at the specified
position.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
setArcAngle(double aArcAngle)
Sets the angle over which this
ILcd3DEditableArcBand extends (in degrees). |
void |
setAxisPitch(double aAxisPitch)
Sets the axis pitch of this
ILcd3DEditableArcBand (in degrees). |
void |
setAxisYaw(double aAxisYaw)
Sets the axis yaw of this
ILcd3DEditableArcBand (in degrees). |
void |
setEllipsoid(ILcdEllipsoid aEllipsoid)
Sets the ellipsoid of this
TLcdLonLatHeightArcBand . |
void |
setMaxRadius(double aMaxRadius)
Sets the maximum radius.
|
void |
setMinRadius(double aMinRadius)
Sets the minimum radius.
|
void |
setPitchArcAngle(double aPitchArcAngle)
Sets the angle over which the pitch of this
ILcd3DEditableArcBand extends (in degrees). |
void |
setPitchStartAngle(double aPitchStartAngle)
Sets the start angle of pitch of this
ILcd3DEditableArcBand (in degrees). |
void |
setStartAngle(double aStartAngle)
Sets the start angle of this
ILcd3DEditableArcBand (in degrees). |
String |
toString() |
void |
translate2D(double x,
double y)
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
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
move3D, move3D
move2D
contains2D, contains3D
public TLcdLonLatHeight3DArcBand()
TLcdLonLatHeightArcBand
with all coordinates, angles and axis set to 0,
and with a default ellipsoid.public TLcdLonLatHeight3DArcBand(TLcdLonLatHeight3DArcBand aLonLatHeightArcBand)
TLcdLonLatHeightArcBand
that is a copy of the given TLcdLonLatHeightArcBand
.aLonLatHeightArcBand
- the TLcdLonLatHeightArcBand
to copy.public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch)
TLcdLonLatHeightArcBand
with the given parameters.aCenter
- the center point.aMinRadius
- the minimum radius.aMaxRadius
- the maximum radius.aStartAngle
- the start angle.aArcAngle
- the arc angle.aPitchStartAngle
- the pitch start angleaPitchArcAngle
- the pitch arc angleaAxisYaw
- the yaw of the axisaAxisPitch
- the pitch of the axisIllegalArgumentException
- if the minimum or maximum radius passed is less than 0.
or the maximum radius is smaller than the minimum radius.public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
TLcdLonLatHeightArcBand
with the given parameters.aCenter
- the center point.aMinRadius
- the minimum radius.aMaxRadius
- the maximum radius.aStartAngle
- the start angle.aArcAngle
- the arc angle.aPitchStartAngle
- the pitch start angleaPitchArcAngle
- the pitch arc angleaAxisYaw
- the yaw of the axisaAxisPitch
- the pitch of the axisaEllipsoid
- the ellipsoid.IllegalArgumentException
- if the minimum or maximum radius passed is less than 0.
or the maximum radius is smaller than the minimum radius.public TLcdLonLatHeight3DArcBand(double aCenterLon, double aCenterLat, double aCenterHeight, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
TLcdLonLatHeightArcBand
with the given parameters.aCenterLon
- the longitude of the center.aCenterLat
- the latitude of the center.aCenterHeight
- the height of the center.aMinRadius
- the minimum radius.aMaxRadius
- the maximum radius.aStartAngle
- the start angle.aArcAngle
- the arc angle.aPitchStartAngle
- the pitch start angleaPitchArcAngle
- the pitch arc angleaAxisYaw
- the yaw of the axisaAxisPitch
- the pitch of the axisaEllipsoid
- the ellipsoid.IllegalArgumentException
- if the minimum or maximum radius passed is less than 0.
or the maximum radius is smaller than the minimum radius.public ILcdEllipsoid getEllipsoid()
TLcdLonLatHeightArcBand
.TLcdLonLatHeightArcBand
. Never null
.public void setEllipsoid(ILcdEllipsoid aEllipsoid)
TLcdLonLatHeightArcBand
.aEllipsoid
- the new ellipsoid.public void translate2D(double x, double y)
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
x
- the x coordinate of the translation vector.y
- 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 void move2D(double x, double y)
ALcd2DEditableShape
move2D
in interface ILcd2DEditableShape
x
- the x coordinate of the point.y
- the y coordinate of the point.public Object clone()
clone
in interface ILcdCloneable
Object.clone()
public boolean equals(Object o)
public int hashCode()
ALcdShape
ALcdShape.equals(Object)
method.
Extensions should refine this implementation, based on their properties.public final ILcdPoint getCenter()
ILcd3DArcBand
ILcd3DArcBand
.getCenter
in interface ILcd3DArcBand
ILcd3DArcBand
.public void setMinRadius(double aMinRadius)
setMinRadius
in interface ILcd3DEditableArcBand
aMinRadius
- the radius of the inner surface of the arc band.IllegalArgumentException
- if the radius passed is less than 0
or the maximum radius is smaller than the new minimum radius.public final double getMinRadius()
ILcd3DArcBand
ILcd3DArcBand
.
The minimum radius is smaller than the maximum radius and never smaller than 0.getMinRadius
in interface ILcd3DArcBand
ILcd3DArcBand
.public void setMaxRadius(double aMaxRadius)
setMaxRadius
in interface ILcd3DEditableArcBand
aMaxRadius
- the radius of the outer surface of the arc band.IllegalArgumentException
- if the radius passed is less than 0
or the new maximum radius is smaller than the minimum radius.public final double getMaxRadius()
ILcd3DArcBand
ILcd3DArcBand
.
The maximum radius is larger than the minimum radius and never smaller than 0.getMaxRadius
in interface ILcd3DArcBand
ILcd3DArcBand
.public final double getStartAngle()
ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the axis yaw, positive
counter-clockwise.getStartAngle
in interface ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the axis yaw, positive
counter-clockwise.public void setStartAngle(double aStartAngle)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
(in degrees).
The angle is measured from 3 o'clock position, positive
counter-clockwise.setStartAngle
in interface ILcd3DEditableArcBand
aStartAngle
- the new start angle.public final double getArcAngle()
ILcd3DArcBand
ILcd3DArcBand
extends (in degrees).
The angle is positive counter-clockwise.getArcAngle
in interface ILcd3DArcBand
ILcd3DArcBand
extends (in degrees).
The angle is positive counter-clockwise.public void setArcAngle(double aArcAngle)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
extends (in degrees).
The angle is positive counter-clockwise.setArcAngle
in interface ILcd3DEditableArcBand
aArcAngle
- the new arc angle.public final double getPitchStartAngle()
ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the axis pitch, positive
counter-clockwise.getPitchStartAngle
in interface ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the axis pitch, positive
counter-clockwise.public void setPitchStartAngle(double aPitchStartAngle)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
(in degrees).
The angle is measured from horizontal position, positive
counter-clockwise.setPitchStartAngle
in interface ILcd3DEditableArcBand
aPitchStartAngle
- the new pitch start angle.public final double getPitchArcAngle()
ILcd3DArcBand
ILcd3DArcBand
extends (in degrees).
The angle is positive counter-clockwise.getPitchArcAngle
in interface ILcd3DArcBand
ILcd3DArcBand
extends (in degrees).
The angle is positive counter-clockwise.public void setPitchArcAngle(double aPitchArcAngle)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
extends (in degrees).
The angle is positive counter-clockwise.setPitchArcAngle
in interface ILcd3DEditableArcBand
aPitchArcAngle
- the new pitch arc angle.public final double getAxisYaw()
ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the 3 o'clock position in the horizontal plane, positive
counter-clockwise.getAxisYaw
in interface ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the 3 o'clock position in the horizontal plane, positive
counter-clockwise.public void setAxisYaw(double aAxisYaw)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
(in degrees).
The angle is positive counter-clockwise.setAxisYaw
in interface ILcd3DEditableArcBand
aAxisYaw
- the axis yaw.public final double getAxisPitch()
ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the 3 o'clock position in the plane
defined by the axis yaw and the vertical axis, positive
counter-clockwise.getAxisPitch
in interface ILcd3DArcBand
ILcd3DArcBand
(in degrees).
The angle is measured from the 3 o'clock position in the plane
defined by the axis yaw and the vertical axis, positive
counter-clockwise.public void setAxisPitch(double aAxisPitch)
ILcd3DEditableArcBand
ILcd3DEditableArcBand
(in degrees).
The angle is positive counter-clockwise.setAxisPitch
in interface ILcd3DEditableArcBand
aAxisPitch
- the axis pitch.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)
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.
Note: this method does a contains2D on the bounds of this 3D arc band.
The contains functionality is only offered in 3D
.
contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(double aX, double aY, double aZ)
ALcd2DEditableShape
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.true
if the bounds of this shape contain the point in the 3D space
and the shape itself contains the point in the 2D space, false
otherwise.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