Class ALcd3DEditableLine
- All Implemented Interfaces:
ILcdBounded
,ILcdPointList
,ILcdPolyline
,ILcdShape
,ILcd2DEditablePointList
,ILcd2DEditablePolyline
,ILcd2DEditableShape
,ILcd3DEditablePointList
,ILcd3DEditablePolyline
,ILcd3DEditableShape
,ILcdCache
,ILcdCloneable
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdLonLatHeightLine
,TLcdXYZLine
ILcd3DEditablePolyline
interface, where the polyline is a simple line with two vertices.
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 by
moving or translating its points.
This class has a focus point cache.
For for computing the focus point, implementations may override the method
calculateFocusPoint()
. The default implementation computes the
center of the bounding box.
The result of calculateFocusPoint()
is only used if the focus point
has not been set explicitly using setFocusPoint(ILcdPoint)
.
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:
-
Field Summary
Fields inherited from class com.luciad.shape.shape2D.ALcd2DEditableLine
fBounds, fFocusPoint, fPoint1, fPoint2
-
Constructor Summary
ConstructorDescriptionALcd3DEditableLine
(ILcd3DEditablePoint aPoint1, ILcd3DEditablePoint aPoint2) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Computes the focus point as the center of the bounding box.void
insert3DPoint
(int aIndex, double aX, double aY, double aZ) This is not allowed.void
move3D
(double aX, double aY, double aZ) Moves thisILcd3DEditableShape
to the given point in the 3D space.void
Moves thisILcd3DEditableShape
to the given point in the 3D space.void
move3DPoint
(int aIndex, double aX, double aY, double aZ) Moves the specified point of thisILcd3DEditablePointList
to the given point in the 3D space.void
setFocusPoint
(ILcd3DEditablePoint aFocusPoint) void
translate3D
(double aDeltaX, double aDeltaY, double aDeltaZ) Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.void
translate3DPoint
(int aIndex, double aDeltaX, double aDeltaY, double deltaZ) Translates the specified point of thisILcd3DEditablePointList
from its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableLine
calculateBounds, clearCache, clone, contains2D, equals, getBounds, getCachedObject, getFocusPoint, getPoint, getPointCount, hashCode, insert2DPoint, insertIntoCache, invalidateBounds, move2D, move2DPoint, removeCachedObject, removePointAt, setFocusPoint, toString, translate2D, translate2DPoint
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, 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.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, translate2D, translate2DPoint
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2D
Methods inherited from interface com.luciad.shape.shape3D.ILcd3DEditablePointList
removePointAt
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.util.ILcdCloneable
clone
Methods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
Methods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
ALcd3DEditableLine
-
-
Method Details
-
move3D
Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
move3D
public void move3D(double aX, double aY, double aZ) Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.
-
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 interfaceILcd3DEditablePointList
- 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.
-
calculateFocusPoint
protected void calculateFocusPoint()Computes the focus point as the center of the bounding box. The resultingILcd3DEditablePoint
is stored infFocusPoint
.- Overrides:
calculateFocusPoint
in classALcd2DEditableLine
-
setFocusPoint
-
move3DPoint
public void move3DPoint(int aIndex, double aX, double aY, double aZ) Description copied from interface:ILcd3DEditablePointList
Moves the specified point of thisILcd3DEditablePointList
to the given point in the 3D space.- Specified by:
move3DPoint
in interfaceILcd3DEditablePointList
- Parameters:
aIndex
- a valid index in the list of points.aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.
-
translate3DPoint
public void translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double deltaZ) Description copied from interface:ILcd3DEditablePointList
Translates the specified point of thisILcd3DEditablePointList
from its current position over the given translation vector in the 3D space.- Specified by:
translate3DPoint
in interfaceILcd3DEditablePointList
- Parameters:
aIndex
- a valid new index in the list of points.aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.deltaZ
- the z coordinate of the translation vector.
-
insert3DPoint
public void insert3DPoint(int aIndex, double aX, double aY, double aZ) This is not allowed. A line always consists of 2 points.- Specified by:
insert3DPoint
in interfaceILcd3DEditablePointList
- Parameters:
aIndex
- not used.aX
- not used.aY
- not used.aZ
- not used.
-