Package com.luciad.shape.shape3D
Class ALcd3DEditableFloatPolypoint
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.shape2D.ALcd2DEditableShape
com.luciad.shape.shape3D.ALcd3DEditableShape
com.luciad.shape.shape3D.ALcd3DEditableFloatPolypoint
- All Implemented Interfaces:
ILcdBounded,ILcdPointList,ILcdPolypoint,ILcdShape,ILcd2DEditablePointList,ILcd2DEditablePolypoint,ILcd2DEditableShape,ILcd3DEditablePointList,ILcd3DEditablePolypoint,ILcd3DEditableShape,ILcdCloneable,Serializable,Cloneable
- Direct Known Subclasses:
TLcdXYZFloatPolygon,TLcdXYZFloatPolyline,TLcdXYZFloatPolypoint
public abstract class ALcd3DEditableFloatPolypoint
extends ALcd3DEditableShape
implements ILcd3DEditablePolypoint
This abstract class provides a basis for implementing the
ILcd2DEditablePolypoint interface.
This class is not thread-safe.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionALcd3DEditableFloatPolypoint(float[] aCoordinates, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) ALcd3DEditableFloatPolypoint(ALcd3DEditableFloatPolypoint aFloatPolypoint) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalculateBounds(ILcd3DEditableBounds aBoundsSFCT) This method should compute the bounds of the polypoint.protected voidcalculateFocusPoint(ILcd3DEditablePoint aFocusPointSFCT) Computes the focus point as the center of the bounding box.clone()Creates and returns a copy of this object, by delegating toObject.clone().booleancontains2D(double aX, double aY) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains3D(double aX, double aY, double aZ) Provides an approximate default implementation of the 3D containment test based on the 2D containment test.protected abstract ILcd3DEditableBoundsCreates an uninitializedILcd3DEditableBoundsobject of a type compatible with the concrete implementation of this class.protected abstract ILcd3DEditablePointCreates an uninitializedILcd3DEditablePointpoint of a type compatible with the concrete implementation of this class (geodesic/cartesian).booleanChecks whether thisALcd2DEditableFloatPolypointis equal to the givenObject.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.Returns the focus point of thisILcdShape.final ILcdPointgetPoint(int aIndex) Returns theILcdPointat a given index.final intReturns the number ofILcdPointobjects in the list.inthashCode()The hash code of this shape is the hash code of its class, in order to be consistent with theALcdShape.equals(Object)method.voidinsert2DPoint(int aIndex, double aX, double aY) Inserts a point at the given index into thisILcd2DEditablePointList.voidinsert3DPoint(int aIndex, double aX, double aY, double aZ) Inserts a point at the given index into thisILcd3DEditablePointList.protected voidvoidmove2D(double aX, double aY) Translates this shape so that its focus point ends up at the specified position.voidmove2DPoint(int aIndex, double aX, double aY) Moves the specified point of thisILcd2DEditablePointListto the given point in the 2D space.voidmove3D(double aX, double aY, double aZ) Moves 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.voidremovePointAt(int aIndex) Removes the point at the given index from thisILcd2DEditablePointList.voidtranslate2D(double aDeltaX, double aDeltaY) Translates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space.voidtranslate2DPoint(int aIndex, double aDeltaX, double aDeltaY) Translates the specified point of thisILcd2DEditablePointListfrom its current position over the given translation vector in the 2D space.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 aDeltaZ) 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.shape3D.ALcd3DEditableShape
move3DMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
move2DMethods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditablePointList
append2DPointMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2DMethods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableShape
move3DMethods inherited from interface com.luciad.shape.ILcdPointList
getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D
-
Constructor Details
-
ALcd3DEditableFloatPolypoint
public ALcd3DEditableFloatPolypoint() -
ALcd3DEditableFloatPolypoint
public ALcd3DEditableFloatPolypoint(float[] aCoordinates, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) -
ALcd3DEditableFloatPolypoint
-
-
Method Details
-
getPointCount
public final int getPointCount()Description copied from interface:ILcdPointListReturns the number ofILcdPointobjects in the list.- Specified by:
getPointCountin interfaceILcdPointList- Returns:
- the number of
ILcdPointobjects in the list.
-
getPoint
Description copied from interface:ILcdPointListReturns theILcdPointat a given index.- Specified by:
getPointin interfaceILcdPointList- Parameters:
aIndex- a valid index in the list ofILcdPointobjects.- Returns:
- the
ILcdPointat the given index.
-
move2DPoint
public void move2DPoint(int aIndex, double aX, double aY) Description copied from interface:ILcd2DEditablePointListMoves the specified point of thisILcd2DEditablePointListto the given point in the 2D space. Only the first two dimensions of theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
move2DPointin interfaceILcd2DEditablePointList- Parameters:
aIndex- a valid index in the list of points.aX- the x coordinate of the point.aY- the y coordinate of the point.
-
translate2DPoint
public void translate2DPoint(int aIndex, double aDeltaX, double aDeltaY) Description copied from interface:ILcd2DEditablePointListTranslates the specified point of thisILcd2DEditablePointListfrom 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.- Specified by:
translate2DPointin interfaceILcd2DEditablePointList- Parameters:
aDeltaX- the x coordinate of the translation vector.aDeltaY- the y coordinate of the translation vector.
-
insert2DPoint
public void insert2DPoint(int aIndex, double aX, double aY) Description copied from interface:ILcd2DEditablePointListInserts a point at the given index into thisILcd2DEditablePointList.- Specified by:
insert2DPointin interfaceILcd2DEditablePointList- Parameters:
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.
-
removePointAt
public void removePointAt(int aIndex) Description copied from interface:ILcd2DEditablePointListRemoves the point at the given index from thisILcd2DEditablePointList.- Specified by:
removePointAtin interfaceILcd2DEditablePointList- Specified by:
removePointAtin interfaceILcd3DEditablePointList- Parameters:
aIndex- a valid index in the list ofILcdPointobjects.
-
invalidate
protected void invalidate() -
calculateBounds
This method should compute the bounds of the polypoint. The resultingILcd2DEditableBoundsshould be stored inaBoundsSFCT. -
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.
-
calculateFocusPoint
Computes the focus point as the center of the bounding box. The resultingILcd2DEditablePointis stored inaFocusPoint. -
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
contains2D
public boolean contains2D(double aX, double aY) 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:
aX- the x coordinate of the point.aY- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
translate2D
public void translate2D(double aDeltaX, double aDeltaY) 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 interfaceILcd2DEditablePointList- Specified by:
translate2Din interfaceILcd2DEditableShape- Parameters:
aDeltaX- the x coordinate of the translation vector.aDeltaY- the y coordinate of the translation vector.
-
move2D
public void move2D(double aX, double aY) Description copied from class:ALcd2DEditableShapeTranslates this shape so that its focus point ends up at the specified position.- Specified by:
move2Din interfaceILcd2DEditableShape- Overrides:
move2Din classALcd2DEditableShape- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.
-
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- Overrides:
move3Din classALcd3DEditableShape- 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.
-
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 aDeltaZ) 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.aDeltaZ- the z coordinate of the translation vector.
-
insert3DPoint
public void insert3DPoint(int aIndex, double aX, double aY, double aZ) Description copied from interface:ILcd3DEditablePointListInserts a point at the given index into thisILcd3DEditablePointList.- Specified by:
insert3DPointin interfaceILcd3DEditablePointList- Parameters:
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.
-
contains3D
public boolean contains3D(double aX, double aY, double aZ) Description copied from class:ALcd2DEditableShapeProvides an approximate default implementation of the 3D containment test based on the 2D containment test.- Specified by:
contains3Din interfaceILcdShape- Overrides:
contains3Din classALcd2DEditableShape- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.aZ- the z coordinate of the point.- Returns:
trueif the bounds of this shape contain the point in the 3D space and the shape itself contains the point in the 2D space,falseotherwise.
-
clone
Description copied from class:ALcdShapeCreates and returns a copy of this object, by delegating toObject.clone(). Extensions should delegate to this implementation withsuper.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.- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classALcdShape- See Also:
-
equals
Checks whether thisALcd2DEditableFloatPolypointis equal to the givenObject. -
createPoint
Creates an uninitializedILcd3DEditablePointpoint of a type compatible with the concrete implementation of this class (geodesic/cartesian). The created point will be updated and returned by thegetPoint(int)andgetFocusPoint()methods. -
createBounds
Creates an uninitializedILcd3DEditableBoundsobject of a type compatible with the concrete implementation of this class. This bounds object will be updated and returned by thegetBounds()method. -
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.
-