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
ConstructorsConstructorDescriptionConstructs a newTLcdLonLatHeightArcBandwith 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 newTLcdLonLatHeightArcBandwith the given parameters.TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch) Constructs a newTLcdLonLatHeightArcBandwith 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 newTLcdLonLatHeightArcBandwith the given parameters.TLcdLonLatHeight3DArcBand(TLcdLonLatHeight3DArcBand aLonLatHeightArcBand) Constructs a newTLcdLonLatHeightArcBandthat is a copy of the givenTLcdLonLatHeightArcBand. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.clone()Creates and returns a copy of this object.booleancontains2D(double aX, double aY) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains3D(double aX, double aY, double aZ) Provides an approximate default implementation of the 3D containment test based on the 2D containment test.booleanReturns whether the given object has the same class and the same coordinates and parameters.final doubleReturns the angle over which thisILcd3DArcBandextends (in degrees).final doubleReturns the pitch angle of (the axis of) thisILcd3DArcBand(in degrees).final doubleReturns the yaw angle of (the axis of) thisILcd3DArcBand(in degrees).Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.final ILcdPointReturns the center point of thisILcd3DArcBand.Returns the ellipsoid of thisTLcdLonLatHeightArcBand.Returns the focus point of thisILcdShape.final doubleReturns the maximum radius of thisILcd3DArcBand.final doubleReturns the minimum radius of thisILcd3DArcBand.final doubleReturns the angle over which the pitch of thisILcd3DArcBandextends (in degrees).final doubleReturns the start angle of the pitch of thisILcd3DArcBand(in degrees).final doubleReturns the start angle of thisILcd3DArcBand(in degrees).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.voidmove2D(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.voidsetArcAngle(double aArcAngle) Sets the angle over which thisILcd3DEditableArcBandextends (in degrees).voidsetAxisPitch(double aAxisPitch) Sets the axis pitch of thisILcd3DEditableArcBand(in degrees).voidsetAxisYaw(double aAxisYaw) Sets the axis yaw of thisILcd3DEditableArcBand(in degrees).voidsetEllipsoid(ILcdEllipsoid aEllipsoid) Sets the ellipsoid of thisTLcdLonLatHeightArcBand.voidsetMaxRadius(double aMaxRadius) Sets the maximum radius.voidsetMinRadius(double aMinRadius) Sets the minimum radius.voidsetPitchArcAngle(double aPitchArcAngle) Sets the angle over which the pitch of thisILcd3DEditableArcBandextends (in degrees).voidsetPitchStartAngle(double aPitchStartAngle) Sets the start angle of pitch of thisILcd3DEditableArcBand(in degrees).voidsetStartAngle(double aStartAngle) Sets the start angle of thisILcd3DEditableArcBand(in degrees).toString()voidtranslate2D(double x, double y) Translates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space.voidtranslate3D(double aDeltaX, double aDeltaY, double aDeltaZ) Translates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.shape.shape3D.ALcd3DEditableShape
move3D, move3DMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
move2DMethods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2DMethods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableShape
move3D, move3DMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D
-
Constructor Details
-
TLcdLonLatHeight3DArcBand
public TLcdLonLatHeight3DArcBand()Constructs a newTLcdLonLatHeightArcBandwith all coordinates, angles and axis set to 0, and with a default ellipsoid. -
TLcdLonLatHeight3DArcBand
Constructs a newTLcdLonLatHeightArcBandthat is a copy of the givenTLcdLonLatHeightArcBand.- Parameters:
aLonLatHeightArcBand- theTLcdLonLatHeightArcBandto copy.
-
TLcdLonLatHeight3DArcBand
public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch) Constructs a newTLcdLonLatHeightArcBandwith 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 newTLcdLonLatHeightArcBandwith 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 newTLcdLonLatHeightArcBandwith 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:ILcd2DEditableShapeTranslates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
translate2Din 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:ILcd3DEditableShapeTranslates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.- Specified by:
translate3Din 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:ALcd2DEditableShapeTranslates this shape so that its focus point ends up at the specified position.- Specified by:
move2Din 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:
clonein 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: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. -
getCenter
Description copied from interface:ILcd3DArcBandReturns the center point of thisILcd3DArcBand.- Specified by:
getCenterin interfaceILcd3DArcBand- Returns:
- the center point of this
ILcd3DArcBand.
-
setMinRadius
public void setMinRadius(double aMinRadius) Sets the minimum radius.- Specified by:
setMinRadiusin 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:ILcd3DArcBandReturns the minimum radius of thisILcd3DArcBand. The minimum radius is smaller than the maximum radius and never smaller than 0.- Specified by:
getMinRadiusin interfaceILcd3DArcBand- Returns:
- the minimum radius of this
ILcd3DArcBand.
-
setMaxRadius
public void setMaxRadius(double aMaxRadius) Sets the maximum radius.- Specified by:
setMaxRadiusin 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:ILcd3DArcBandReturns the maximum radius of thisILcd3DArcBand. The maximum radius is larger than the minimum radius and never smaller than 0.- Specified by:
getMaxRadiusin interfaceILcd3DArcBand- Returns:
- the maximum radius of this
ILcd3DArcBand.
-
getStartAngle
public final double getStartAngle()Description copied from interface:ILcd3DArcBandReturns the start angle of thisILcd3DArcBand(in degrees). The angle is measured from the axis yaw, positive counter-clockwise.- Specified by:
getStartAnglein 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:ILcd3DEditableArcBandSets the start angle of thisILcd3DEditableArcBand(in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
setStartAnglein interfaceILcd3DEditableArcBand- Parameters:
aStartAngle- the new start angle.
-
getArcAngle
public final double getArcAngle()Description copied from interface:ILcd3DArcBandReturns the angle over which thisILcd3DArcBandextends (in degrees). The angle is positive counter-clockwise.- Specified by:
getArcAnglein interfaceILcd3DArcBand- Returns:
- the angle over which this
ILcd3DArcBandextends (in degrees). The angle is positive counter-clockwise.
-
setArcAngle
public void setArcAngle(double aArcAngle) Description copied from interface:ILcd3DEditableArcBandSets the angle over which thisILcd3DEditableArcBandextends (in degrees). The angle is positive counter-clockwise.- Specified by:
setArcAnglein interfaceILcd3DEditableArcBand- Parameters:
aArcAngle- the new arc angle.
-
getPitchStartAngle
public final double getPitchStartAngle()Description copied from interface:ILcd3DArcBandReturns the start angle of the pitch of thisILcd3DArcBand(in degrees). The angle is measured from the axis pitch, positive counter-clockwise.- Specified by:
getPitchStartAnglein 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:ILcd3DEditableArcBandSets the start angle of pitch of thisILcd3DEditableArcBand(in degrees). The angle is measured from horizontal position, positive counter-clockwise.- Specified by:
setPitchStartAnglein interfaceILcd3DEditableArcBand- Parameters:
aPitchStartAngle- the new pitch start angle.
-
getPitchArcAngle
public final double getPitchArcAngle()Description copied from interface:ILcd3DArcBandReturns the angle over which the pitch of thisILcd3DArcBandextends (in degrees). The angle is positive counter-clockwise.- Specified by:
getPitchArcAnglein interfaceILcd3DArcBand- Returns:
- the angle over which the pitch of this
ILcd3DArcBandextends (in degrees). The angle is positive counter-clockwise.
-
setPitchArcAngle
public void setPitchArcAngle(double aPitchArcAngle) Description copied from interface:ILcd3DEditableArcBandSets the angle over which the pitch of thisILcd3DEditableArcBandextends (in degrees). The angle is positive counter-clockwise.- Specified by:
setPitchArcAnglein interfaceILcd3DEditableArcBand- Parameters:
aPitchArcAngle- the new pitch arc angle.
-
getAxisYaw
public final double getAxisYaw()Description copied from interface:ILcd3DArcBandReturns 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:
getAxisYawin 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:ILcd3DEditableArcBandSets the axis yaw of thisILcd3DEditableArcBand(in degrees). The angle is positive counter-clockwise.- Specified by:
setAxisYawin interfaceILcd3DEditableArcBand- Parameters:
aAxisYaw- the axis yaw.
-
getAxisPitch
public final double getAxisPitch()Description copied from interface:ILcd3DArcBandReturns 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:
getAxisPitchin 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:ILcd3DEditableArcBandSets the axis pitch of thisILcd3DEditableArcBand(in degrees). The angle is positive counter-clockwise.- Specified by:
setAxisPitchin interfaceILcd3DEditableArcBand- Parameters:
aAxisPitch- the axis pitch.
-
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
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.
-
contains2D
public boolean contains2D(double aX, double aY) Checks whether thisILcdShapecontains the given point in the 2D space. Only the first two dimensions of theILcdShapeare 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:
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 class:ALcd2DEditableShapeProvides an approximate default implementation of the 3D containment test based on the 2D containment test.- Specified by:
contains3Din interfaceILcdShape- Overrides:
contains3Din classALcd2DEditableShape- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.aZ- the z coordinate of the point.- Returns:
trueif the bounds of this shape contain the point in the 3D space and the shape itself contains the point in the 2D space,falseotherwise.
-
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
-
toString
-