public abstract class ALcd3DEditableFloatPolypoint extends ALcd3DEditableShape implements ILcd3DEditablePolypoint
ILcd2DEditablePolypoint
interface.
This class is not thread-safe.
Constructor and Description |
---|
ALcd3DEditableFloatPolypoint() |
ALcd3DEditableFloatPolypoint(ALcd3DEditableFloatPolypoint aFloatPolypoint) |
ALcd3DEditableFloatPolypoint(float[] aCoordinates,
boolean aHasBounds,
boolean aBoundsInitialized,
boolean aClone) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateBounds(ILcd3DEditableBounds aBoundsSFCT)
This method should compute the bounds of the polypoint.
|
protected void |
calculateFocusPoint(ILcd3DEditablePoint aFocusPointSFCT)
Computes the focus point as the center of the bounding box.
|
Object |
clone()
Creates and returns a copy of this object, by delegating to
Object.clone() . |
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Provides an approximate default implementation of the 3D containment test
based on the 2D containment test.
|
protected abstract ILcd3DEditableBounds |
createBounds()
Creates an uninitialized
ILcd3DEditableBounds object of a type compatible with the
concrete implementation of this class. |
protected abstract ILcd3DEditablePoint |
createPoint()
Creates an uninitialized
ILcd3DEditablePoint point of a type compatible with the
concrete implementation of this class (geodesic/cartesian). |
boolean |
equals(Object aObject)
Checks whether this
ALcd2DEditableFloatPolypoint is equal to the given Object . |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
ILcdPoint |
getPoint(int aIndex)
Returns the
ILcdPoint at a given index. |
int |
getPointCount()
Returns the number of
ILcdPoint objects in the list. |
int |
hashCode()
The hash code of this shape is the hash code of its class, in order to
be consistent with the
ALcdShape.equals(Object) method. |
void |
insert2DPoint(int aIndex,
double aX,
double aY)
Inserts a point at the given index into this
ILcd2DEditablePointList . |
void |
insert3DPoint(int aIndex,
double aX,
double aY,
double aZ)
Inserts a point at the given index into this
ILcd3DEditablePointList . |
protected void |
invalidate() |
void |
move2D(double aX,
double aY)
Translates this shape so that its focus point ends up at the specified
position.
|
void |
move2DPoint(int aIndex,
double aX,
double aY)
Moves the specified point of this
ILcd2DEditablePointList to the given point in the 2D space. |
void |
move3D(double aX,
double aY,
double aZ)
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 |
removePointAt(int aIndex)
Removes the point at the given index from this
ILcd2DEditablePointList . |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate2DPoint(int aIndex,
double aDeltaX,
double aDeltaY)
Translates the specified point of this
ILcd2DEditablePointList from its current position
over the given translation vector in the 2D space. |
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 aDeltaZ)
Translates the specified point of this
ILcd3DEditablePointList from its current position
over the given translation vector in the 3D space. |
move3D
move2D
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
move3D
move2D
contains2D, contains3D
append2DPoint
getPointSFCT, getX, getY, getZ
public ALcd3DEditableFloatPolypoint()
public ALcd3DEditableFloatPolypoint(float[] aCoordinates, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone)
public ALcd3DEditableFloatPolypoint(ALcd3DEditableFloatPolypoint aFloatPolypoint)
public final int getPointCount()
ILcdPointList
ILcdPoint
objects in the list.getPointCount
in interface ILcdPointList
ILcdPoint
objects in the list.public final ILcdPoint getPoint(int aIndex)
ILcdPointList
ILcdPoint
at a given index.getPoint
in interface ILcdPointList
aIndex
- a valid index in the list of ILcdPoint
objects.ILcdPoint
at the given index.public void move2DPoint(int aIndex, double aX, double aY)
ILcd2DEditablePointList
ILcd2DEditablePointList
to the given point in the 2D space. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2DPoint
in interface ILcd2DEditablePointList
aIndex
- a valid index in the list of points.aX
- the x coordinate of the point.aY
- the y coordinate of the point.public void translate2DPoint(int aIndex, double aDeltaX, double aDeltaY)
ILcd2DEditablePointList
ILcd2DEditablePointList
from its current position
over the given translation vector in the 2D space. Only the first two
dimensions of the points are considered. The third dimension is left unchanged.translate2DPoint
in interface ILcd2DEditablePointList
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public void insert2DPoint(int aIndex, double aX, double aY)
ILcd2DEditablePointList
ILcd2DEditablePointList
.insert2DPoint
in interface ILcd2DEditablePointList
aIndex
- a valid new index in the list of points.aX
- the x coordinate of the new point.aY
- the y coordinate of the new point.public void removePointAt(int aIndex)
ILcd2DEditablePointList
ILcd2DEditablePointList
.removePointAt
in interface ILcd2DEditablePointList
removePointAt
in interface ILcd3DEditablePointList
aIndex
- a valid index in the list of ILcdPoint
objects.protected void invalidate()
protected void calculateBounds(ILcd3DEditableBounds aBoundsSFCT)
ILcd2DEditableBounds
should be stored in aBoundsSFCT
.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
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 undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.protected void calculateFocusPoint(ILcd3DEditablePoint aFocusPointSFCT)
ILcd2DEditablePoint
is stored in aFocusPoint
.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(double aX, double aY)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditablePointList
translate2D
in interface ILcd2DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public void move2D(double aX, double aY)
ALcd2DEditableShape
move2D
in interface ILcd2DEditableShape
move2D
in class ALcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.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
move3D
in class ALcd3DEditableShape
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.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 aDeltaZ)
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.aDeltaZ
- the z coordinate of the translation vector.public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
.insert3DPoint
in interface ILcd3DEditablePointList
aIndex
- a valid new index in the list of points.aX
- the x coordinate of the new point.aY
- the y coordinate of the new point.aZ
- the z coordinate of the new point.public boolean contains3D(double aX, double aY, double aZ)
ALcd2DEditableShape
contains3D
in interface ILcdShape
contains3D
in class ALcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.true
if the bounds of this shape contain the point in the 3D space
and the shape itself contains the point in the 2D space, false
otherwise.public Object clone()
ALcdShape
Object.clone()
. Extensions should delegate to this implementation
with super.clone()
, in order to create an object instance of
the right type, with all fields copied. They then should explicitly
clone any non-primitive fields for which a deeper clone is required.clone
in interface ILcdCloneable
clone
in class ALcdShape
Object.clone()
public boolean equals(Object aObject)
ALcd2DEditableFloatPolypoint
is equal to the given Object
.protected abstract ILcd3DEditablePoint createPoint()
ILcd3DEditablePoint
point of a type compatible with the
concrete implementation of this class (geodesic/cartesian). The created point will be updated
and returned by the getPoint(int)
and getFocusPoint()
methods.protected abstract ILcd3DEditableBounds createBounds()
ILcd3DEditableBounds
object of a type compatible with the
concrete implementation of this class. This bounds object will be updated and returned by the
getBounds()
method.public int hashCode()
ALcdShape
ALcdShape.equals(Object)
method.
Extensions should refine this implementation, based on their properties.