Package com.luciad.shape.shape3D
Class TLcdLonLatHeightDome
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.shape3D.TLcdLonLatHeightDome
- All Implemented Interfaces:
ILcdBounded,ILcdCircle,ILcdShape,ILcd2DEditableCircle,ILcd2DEditableShape,ILcd3DEditableDome,ILcd3DEditableShape,ILcdDome,ILcdCloneable,Serializable,Cloneable
A dome based on a base circle and an altitude. The base circle is the intersection of a sphere
with a plane with a height equal to the altitude.
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.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TLcdLonLatHeightDome(TLcdLonLatCircle aLonLatCircle, double aAltitude) Creates a dome based on the given circle at the given altitude. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this object.booleancontains2D(double x, double y) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains2D(ILcdPoint aPoint) Returns whether the projection of the point passed is contained in the base circle.booleancontains3D(double aLon, double aLat, double aHeight) Returns true if the point with the coordinates (aLon,aLat,aheight) is contained in the dome.booleancontains3D(ILcdPoint aPoint) Returns true if the point with the coordinates (x,y,z) is contained in the dome.booleanReturns whether the given object has the same class and the same coordinates and parameters.doubleReturns the altitude of the center of the sphere.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.Returns the center of thisILcdCircle.Returns the focus point of thisILcdShape.doubleReturns the radius of thisILcdCircle.inthashCode()The hash code of this shape is the hash code of its class, in order to be consistent with theALcdShape.equals(Object)method.voidmove2D(double x, double y) Moves thisILcd2DEditableShapeto the given point in the 2D space.voidMoves thisILcd2DEditableShapeto the given point in the 2D space.voidmove3D(double x, double y, double z) Moves thisILcd3DEditableShapeto the given point in the 3D space.voidMoves thisILcd3DEditableShapeto the given point in the 3D space.voidsetRadius(double aRadius) Sets the radius of the circle on which this dome is based.toString()voidtranslate2D(double x, double y) Translates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space.voidtranslate3D(double x, double y, double z) Translates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.shape.ALcdShape
fromDomainObject
-
Constructor Details
-
TLcdLonLatHeightDome
public TLcdLonLatHeightDome()Default constructor. This places the base circle at the intersection of the equator and the Greenwich meridian. The altitude is set to 0. -
TLcdLonLatHeightDome
Creates a dome based on the given circle at the given altitude.- Parameters:
aLonLatCircle- the circle which is the intersection of the dome with a plane at the given altitude, projected onto earth. The Z coordinate of the center point is not taken into account.aAltitude- the altitude of the center of the base circle of the dome.
-
-
Method Details
-
contains3D
Returns true if the point with the coordinates (x,y,z) is contained in the dome.- Specified by:
contains3Din interfaceILcdShape- Overrides:
contains3Din classALcdShape- Parameters:
aPoint- the point to test.- Returns:
- true when the given point is contained in the sphere.
- See Also:
-
contains3D
public boolean contains3D(double aLon, double aLat, double aHeight) Returns true if the point with the coordinates (aLon,aLat,aheight) is contained in the dome.- Specified by:
contains3Din interfaceILcdShape- Parameters:
aLon- the longitude of the pointaLat- the latitude of the pointaHeight- the altitude of the point- Returns:
- true when the given point is contained in the sphere.
-
getAltitude
public double getAltitude()Returns the altitude of the center of the sphere.- Returns:
- the altitude of the center of the sphere.
-
setRadius
public void setRadius(double aRadius) Sets the radius of the circle on which this dome is based. The radius should be positive (greater than or equal to 0).- Specified by:
setRadiusin interfaceILcd2DEditableCircle- Parameters:
aRadius- the radius of the circle on which this dome is based.- Throws:
IllegalArgumentException- if the radius is less than 0.
-
getCenter
Description copied from interface:ILcdCircleReturns the center of thisILcdCircle.- Specified by:
getCenterin interfaceILcdCircle- Returns:
- the center of this
ILcdCircle.
-
getRadius
public double getRadius()Description copied from interface:ILcdCircleReturns the radius of thisILcdCircle.- Specified by:
getRadiusin interfaceILcdCircle- Returns:
- the radius of this
ILcdCircle.
-
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
contains2D
Returns whether the projection of the point passed is contained in the base circle.- Specified by:
contains2Din interfaceILcdShape- Overrides:
contains2Din classALcdShape- Parameters:
aPoint- the point to check.- Returns:
- true when the point is contained by the base circle at altitude 0. The z coordinate is not taken into account.
- See Also:
-
contains2D
public boolean contains2D(double x, double y) 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:
x- the x coordinate of the point.y- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
move2D
Description copied from interface:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of theILcdShapeand theILcdPointare considered. The third dimension is left unchanged.- Specified by:
move2Din interfaceILcd2DEditableShape- Parameters:
aPoint- theILcdPointto move to.- See Also:
-
move2D
public void move2D(double x, double y) Description copied from interface:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
move2Din interfaceILcd2DEditableShape- Parameters:
x- the x coordinate of the point.y- the y coordinate of the point.
-
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.
-
move3D
Description copied from interface:ILcd3DEditableShapeMoves thisILcd3DEditableShapeto the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3Din interfaceILcd3DEditableShape- Parameters:
aPoint- theILcdPointto move to.- See Also:
-
move3D
public void move3D(double x, double y, double z) Description copied from interface:ILcd3DEditableShapeMoves thisILcd3DEditableShapeto the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3Din interfaceILcd3DEditableShape- Parameters:
x- the x coordinate of the point.y- the y coordinate of the point.z- the z coordinate of the point.
-
translate3D
public void translate3D(double x, double y, double z) Description copied from interface:ILcd3DEditableShapeTranslates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.- Specified by:
translate3Din interfaceILcd3DEditableShape- Parameters:
x- the x coordinate of the translation vector.y- the y coordinate of the translation vector.z- the z coordinate of the translation vector.
-
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.
-
clone
Creates and returns a copy of this object. The base circle and the center point are cloned.- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classALcdShape- 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. -
toString
-