public abstract class ALcd3DEditableLine extends ALcd2DEditableLine implements ILcd3DEditablePolyline
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.
fBounds, fFocusPoint, fPoint1, fPoint2
Constructor and Description |
---|
ALcd3DEditableLine(ILcd3DEditablePoint aPoint1,
ILcd3DEditablePoint aPoint2) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateFocusPoint()
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 this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3D(ILcdPoint aPoint)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3DPoint(int aIndex,
double aX,
double aY,
double aZ)
Moves the specified point of this
ILcd3DEditablePointList to the given point in the 3D space. |
void |
setFocusPoint(ILcd3DEditablePoint aFocusPoint) |
void |
translate3D(double aDeltaX,
double aDeltaY,
double aDeltaZ)
Translates this
ILcd3DEditableShape 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 this
ILcd3DEditablePointList from its current position
over the given translation vector in the 3D space. |
calculateBounds, clearCache, clone, contains2D, equals, getBounds, getCachedObject, getFocusPoint, getPoint, getPointCount, hashCode, insert2DPoint, insertIntoCache, invalidateBounds, move2D, move2DPoint, removeCachedObject, removePointAt, setFocusPoint, toString, translate2D, translate2DPoint
contains3D, move2D
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
move2D, move2D, translate2D
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
clone
removePointAt
append2DPoint, insert2DPoint, move2DPoint, translate2D, translate2DPoint
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
public ALcd3DEditableLine(ILcd3DEditablePoint aPoint1, ILcd3DEditablePoint aPoint2)
public void move3D(ILcdPoint aPoint)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aPoint
- the ILcdPoint
to move to.ILcd3DEditableShape.move3D(double, double, double)
public void move3D(double aX, double aY, double aZ)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditablePointList
translate3D
in interface ILcd3DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.protected void calculateFocusPoint()
ILcd3DEditablePoint
is stored in fFocusPoint
.calculateFocusPoint
in class ALcd2DEditableLine
public void setFocusPoint(ILcd3DEditablePoint aFocusPoint)
public void move3DPoint(int aIndex, double aX, double aY, double aZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
to the given point in the 3D space.move3DPoint
in interface ILcd3DEditablePointList
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.public void translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double deltaZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
from its current position
over the given translation vector in the 3D space.translate3DPoint
in interface ILcd3DEditablePointList
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.public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
insert3DPoint
in interface ILcd3DEditablePointList
aIndex
- not used.aX
- not used.aY
- not used.aZ
- not used.