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
ConstructorsConstructorDescriptionALcd3DEditableLine(ILcd3DEditablePoint aPoint1, ILcd3DEditablePoint aPoint2) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidComputes the focus point as the center of the bounding box.voidinsert3DPoint(int aIndex, double aX, double aY, double aZ) This is not allowed.voidmove3D(double aX, double aY, double aZ) Moves thisILcd3DEditableShapeto the given point in the 3D space.voidMoves thisILcd3DEditableShapeto the given point in the 3D space.voidmove3DPoint(int aIndex, double aX, double aY, double aZ) Moves the specified point of thisILcd3DEditablePointListto the given point in the 3D space.voidsetFocusPoint(ILcd3DEditablePoint aFocusPoint) voidtranslate3D(double aDeltaX, double aDeltaY, double aDeltaZ) Translates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.voidtranslate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double deltaZ) Translates the specified point of thisILcd3DEditablePointListfrom 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, translate2DPointMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, 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.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, translate2D, translate2DPointMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2DMethods inherited from interface com.luciad.shape.shape3D.ILcd3DEditablePointList
removePointAtMethods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCloneable
cloneMethods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
ALcd3DEditableLine
-
-
Method Details
-
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 aX, double aY, double aZ) 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:
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:ILcd3DEditableShapeTranslates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.- Specified by:
translate3Din interfaceILcd3DEditablePointList- 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.
-
calculateFocusPoint
protected void calculateFocusPoint()Computes the focus point as the center of the bounding box. The resultingILcd3DEditablePointis stored infFocusPoint.- Overrides:
calculateFocusPointin classALcd2DEditableLine
-
setFocusPoint
-
move3DPoint
public void move3DPoint(int aIndex, double aX, double aY, double aZ) Description copied from interface:ILcd3DEditablePointListMoves the specified point of thisILcd3DEditablePointListto the given point in the 3D space.- Specified by:
move3DPointin 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:ILcd3DEditablePointListTranslates the specified point of thisILcd3DEditablePointListfrom its current position over the given translation vector in the 3D space.- Specified by:
translate3DPointin 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:
insert3DPointin interfaceILcd3DEditablePointList- Parameters:
aIndex- not used.aX- not used.aY- not used.aZ- not used.
-