Class TLcdLonLatHeight3DArcBand
- All Implemented Interfaces:
ILcdBounded
,ILcdShape
,ILcd2DEditableShape
,ILcd3DArcBand
,ILcd3DEditableArcBand
,ILcd3DEditableShape
,ILcdCache
,ILcdCloneable
,Serializable
,Cloneable
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.
- Since:
- 2016.0
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdLonLatHeightArcBand
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 newTLcdLonLatHeightArcBand
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 newTLcdLonLatHeightArcBand
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 newTLcdLonLatHeightArcBand
with the given parameters.TLcdLonLatHeight3DArcBand
(TLcdLonLatHeight3DArcBand aLonLatHeightArcBand) Constructs a newTLcdLonLatHeightArcBand
that is a copy of the givenTLcdLonLatHeightArcBand
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.clone()
Creates and returns a copy of this object.boolean
contains2D
(double aX, double aY) Checks whether thisILcdShape
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
Returns whether the given object has the same class and the same coordinates and parameters.final double
Returns the angle over which thisILcd3DArcBand
extends (in degrees).final double
Returns the pitch angle of (the axis of) thisILcd3DArcBand
(in degrees).final double
Returns the yaw angle of (the axis of) thisILcd3DArcBand
(in degrees).Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.getCachedObject
(Object aKey) Looks up and returns the cached Object corresponding to the given key.final ILcdPoint
Returns the center point of thisILcd3DArcBand
.Returns the ellipsoid of thisTLcdLonLatHeightArcBand
.Returns the focus point of thisILcdShape
.final double
Returns the maximum radius of thisILcd3DArcBand
.final double
Returns the minimum radius of thisILcd3DArcBand
.final double
Returns the angle over which the pitch of thisILcd3DArcBand
extends (in degrees).final double
Returns the start angle of the pitch of thisILcd3DArcBand
(in degrees).final double
Returns the start angle of thisILcd3DArcBand
(in degrees).int
hashCode()
The hash code of this shape is the hash code of its class, in order to be consistent with theALcdShape.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.removeCachedObject
(Object aKey) Looks up and removes the cached Object corresponding to the given key.void
setArcAngle
(double aArcAngle) Sets the angle over which thisILcd3DEditableArcBand
extends (in degrees).void
setAxisPitch
(double aAxisPitch) Sets the axis pitch of thisILcd3DEditableArcBand
(in degrees).void
setAxisYaw
(double aAxisYaw) Sets the axis yaw of thisILcd3DEditableArcBand
(in degrees).void
setEllipsoid
(ILcdEllipsoid aEllipsoid) Sets the ellipsoid of thisTLcdLonLatHeightArcBand
.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 thisILcd3DEditableArcBand
extends (in degrees).void
setPitchStartAngle
(double aPitchStartAngle) Sets the start angle of pitch of thisILcd3DEditableArcBand
(in degrees).void
setStartAngle
(double aStartAngle) Sets the start angle of thisILcd3DEditableArcBand
(in degrees).toString()
void
translate2D
(double x, double y) Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space.void
translate3D
(double aDeltaX, double aDeltaY, double aDeltaZ) Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.shape.shape3D.ALcd3DEditableShape
move3D, move3D
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
move2D
Methods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D
Methods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableShape
move3D, move3D
Methods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D
-
Constructor Details
-
TLcdLonLatHeight3DArcBand
public TLcdLonLatHeight3DArcBand()Constructs a newTLcdLonLatHeightArcBand
with all coordinates, angles and axis set to 0, and with a default ellipsoid. -
TLcdLonLatHeight3DArcBand
Constructs a newTLcdLonLatHeightArcBand
that is a copy of the givenTLcdLonLatHeightArcBand
.- Parameters:
aLonLatHeightArcBand
- theTLcdLonLatHeightArcBand
to copy.
-
TLcdLonLatHeight3DArcBand
public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch) Constructs a newTLcdLonLatHeightArcBand
with the given parameters.- 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 axis- Throws:
IllegalArgumentException
- if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
-
TLcdLonLatHeight3DArcBand
public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid) Constructs a newTLcdLonLatHeightArcBand
with the given parameters.- 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.- Throws:
IllegalArgumentException
- if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
-
TLcdLonLatHeight3DArcBand
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) Constructs a newTLcdLonLatHeightArcBand
with the given parameters.- 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.- Throws:
IllegalArgumentException
- if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
-
-
Method Details
-
getEllipsoid
Returns the ellipsoid of thisTLcdLonLatHeightArcBand
.- Returns:
- the ellipsoid of this
TLcdLonLatHeightArcBand
. Nevernull
.
-
setEllipsoid
Sets the ellipsoid of thisTLcdLonLatHeightArcBand
.- Parameters:
aEllipsoid
- the new ellipsoid.
-
translate2D
public void translate2D(double x, double y) Description copied from interface:ILcd2DEditableShape
Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
translate2D
in interfaceILcd2DEditableShape
- Parameters:
x
- the x coordinate of the translation vector.y
- the y coordinate of the translation vector.
-
translate3D
public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ) Description copied from interface:ILcd3DEditableShape
Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.- Specified by:
translate3D
in interfaceILcd3DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.
-
move2D
public void move2D(double x, double y) Description copied from class:ALcd2DEditableShape
Translates this shape so that its focus point ends up at the specified position.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
x
- the x coordinate of the point.y
- the y coordinate of the point.
-
clone
Creates and returns a copy of this object. The contained center point is cloned. The contained ellipsoid is copied without being cloned. The cache is not copied or cloned at all.- Specified by:
clone
in interfaceILcdCloneable
- See Also:
-
equals
Returns whether the given object has the same class and the same coordinates and parameters. -
hashCode
public int hashCode()Description copied from class:ALcdShape
The 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. -
getCenter
Description copied from interface:ILcd3DArcBand
Returns the center point of thisILcd3DArcBand
.- Specified by:
getCenter
in interfaceILcd3DArcBand
- Returns:
- the center point of this
ILcd3DArcBand
.
-
setMinRadius
public void setMinRadius(double aMinRadius) Sets the minimum radius.- Specified by:
setMinRadius
in interfaceILcd3DEditableArcBand
- Parameters:
aMinRadius
- the radius of the inner surface of the arc band.- Throws:
IllegalArgumentException
- if the radius passed is less than 0 or the maximum radius is smaller than the new minimum radius.
-
getMinRadius
public final double getMinRadius()Description copied from interface:ILcd3DArcBand
Returns the minimum radius of thisILcd3DArcBand
. The minimum radius is smaller than the maximum radius and never smaller than 0.- Specified by:
getMinRadius
in interfaceILcd3DArcBand
- Returns:
- the minimum radius of this
ILcd3DArcBand
.
-
setMaxRadius
public void setMaxRadius(double aMaxRadius) Sets the maximum radius.- Specified by:
setMaxRadius
in interfaceILcd3DEditableArcBand
- Parameters:
aMaxRadius
- the radius of the outer surface of the arc band.- Throws:
IllegalArgumentException
- if the radius passed is less than 0 or the new maximum radius is smaller than the minimum radius.
-
getMaxRadius
public final double getMaxRadius()Description copied from interface:ILcd3DArcBand
Returns the maximum radius of thisILcd3DArcBand
. The maximum radius is larger than the minimum radius and never smaller than 0.- Specified by:
getMaxRadius
in interfaceILcd3DArcBand
- Returns:
- the maximum radius of this
ILcd3DArcBand
.
-
getStartAngle
public final double getStartAngle()Description copied from interface:ILcd3DArcBand
Returns the start angle of thisILcd3DArcBand
(in degrees). The angle is measured from the axis yaw, positive counter-clockwise.- Specified by:
getStartAngle
in interfaceILcd3DArcBand
- Returns:
- the start angle of this
ILcd3DArcBand
(in degrees). The angle is measured from the axis yaw, positive counter-clockwise.
-
setStartAngle
public void setStartAngle(double aStartAngle) Description copied from interface:ILcd3DEditableArcBand
Sets the start angle of thisILcd3DEditableArcBand
(in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
setStartAngle
in interfaceILcd3DEditableArcBand
- Parameters:
aStartAngle
- the new start angle.
-
getArcAngle
public final double getArcAngle()Description copied from interface:ILcd3DArcBand
Returns the angle over which thisILcd3DArcBand
extends (in degrees). The angle is positive counter-clockwise.- Specified by:
getArcAngle
in interfaceILcd3DArcBand
- Returns:
- the angle over which this
ILcd3DArcBand
extends (in degrees). The angle is positive counter-clockwise.
-
setArcAngle
public void setArcAngle(double aArcAngle) Description copied from interface:ILcd3DEditableArcBand
Sets the angle over which thisILcd3DEditableArcBand
extends (in degrees). The angle is positive counter-clockwise.- Specified by:
setArcAngle
in interfaceILcd3DEditableArcBand
- Parameters:
aArcAngle
- the new arc angle.
-
getPitchStartAngle
public final double getPitchStartAngle()Description copied from interface:ILcd3DArcBand
Returns the start angle of the pitch of thisILcd3DArcBand
(in degrees). The angle is measured from the axis pitch, positive counter-clockwise.- Specified by:
getPitchStartAngle
in interfaceILcd3DArcBand
- Returns:
- the start angle of the pitch of this
ILcd3DArcBand
(in degrees). The angle is measured from the axis pitch, positive counter-clockwise.
-
setPitchStartAngle
public void setPitchStartAngle(double aPitchStartAngle) Description copied from interface:ILcd3DEditableArcBand
Sets the start angle of pitch of thisILcd3DEditableArcBand
(in degrees). The angle is measured from horizontal position, positive counter-clockwise.- Specified by:
setPitchStartAngle
in interfaceILcd3DEditableArcBand
- Parameters:
aPitchStartAngle
- the new pitch start angle.
-
getPitchArcAngle
public final double getPitchArcAngle()Description copied from interface:ILcd3DArcBand
Returns the angle over which the pitch of thisILcd3DArcBand
extends (in degrees). The angle is positive counter-clockwise.- Specified by:
getPitchArcAngle
in interfaceILcd3DArcBand
- Returns:
- the angle over which the pitch of this
ILcd3DArcBand
extends (in degrees). The angle is positive counter-clockwise.
-
setPitchArcAngle
public void setPitchArcAngle(double aPitchArcAngle) Description copied from interface:ILcd3DEditableArcBand
Sets the angle over which the pitch of thisILcd3DEditableArcBand
extends (in degrees). The angle is positive counter-clockwise.- Specified by:
setPitchArcAngle
in interfaceILcd3DEditableArcBand
- Parameters:
aPitchArcAngle
- the new pitch arc angle.
-
getAxisYaw
public final double getAxisYaw()Description copied from interface:ILcd3DArcBand
Returns the yaw angle of (the axis of) thisILcd3DArcBand
(in degrees). The angle is measured from the 3 o'clock position in the horizontal plane, positive counter-clockwise.- Specified by:
getAxisYaw
in interfaceILcd3DArcBand
- Returns:
- the yaw angle of (the axis of) this
ILcd3DArcBand
(in degrees). The angle is measured from the 3 o'clock position in the horizontal plane, positive counter-clockwise.
-
setAxisYaw
public void setAxisYaw(double aAxisYaw) Description copied from interface:ILcd3DEditableArcBand
Sets the axis yaw of thisILcd3DEditableArcBand
(in degrees). The angle is positive counter-clockwise.- Specified by:
setAxisYaw
in interfaceILcd3DEditableArcBand
- Parameters:
aAxisYaw
- the axis yaw.
-
getAxisPitch
public final double getAxisPitch()Description copied from interface:ILcd3DArcBand
Returns the pitch angle of (the axis of) thisILcd3DArcBand
(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.- Specified by:
getAxisPitch
in interfaceILcd3DArcBand
- Returns:
- the pitch angle of (the axis of) this
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.
-
setAxisPitch
public void setAxisPitch(double aAxisPitch) Description copied from interface:ILcd3DEditableArcBand
Sets the axis pitch of thisILcd3DEditableArcBand
(in degrees). The angle is positive counter-clockwise.- Specified by:
setAxisPitch
in interfaceILcd3DEditableArcBand
- Parameters:
aAxisPitch
- the axis pitch.
-
getFocusPoint
Description copied from interface:ILcdShape
Returns the focus point of thisILcdShape
.- Specified by:
getFocusPoint
in interfaceILcdShape
- Returns:
- the focus point of this
ILcdShape
.
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
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 ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
contains2D
public boolean contains2D(double aX, double aY) Checks whether thisILcdShape
contains the given point in the 2D space. Only the first two dimensions of theILcdShape
are considered.Note: this method does a contains2D on the bounds of this 3D arc band. The contains functionality is only offered in
3D
.- Specified by:
contains2D
in 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 class:ALcd2DEditableShape
Provides an approximate default implementation of the 3D containment test based on the 2D containment test.- Specified by:
contains3D
in interfaceILcdShape
- Overrides:
contains3D
in classALcd2DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.- Returns:
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.
-
insertIntoCache
Description copied from interface:ILcdCache
Inserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCache
in 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:ILcdCache
Looks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObject
in 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:ILcdCache
Looks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObject
in 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:ILcdCache
Clears the cache.- Specified by:
clearCache
in interfaceILcdCache
-
toString
-