Package com.luciad.shape.shape2D
Class TLcdXYFloatPoint
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.ALcdPoint
com.luciad.shape.shape2D.ALcd2DEditablePoint
com.luciad.shape.shape2D.TLcdXYFloatPoint
- All Implemented Interfaces:
ILcdBounded,ILcdBounds,ILcdPoint,ILcdPointList,ILcdPolypoint,ILcdShape,ILcd2DEditablePoint,ILcd2DEditableShape,ILcdCloneable,Serializable,Cloneable
This class provides an implementation of
ILcd2DEditablePoint in
the cartesian space, but internally using floats instead of doubles.
This class is thread-safe for read-only access.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs and initializes a newTLcdXYFloatPointinitialized with (0, 0).TLcdXYFloatPoint(double aX, double aY) Constructs and initializes a newTLcdXYFloatPointwith the specified x and y coordinates.TLcdXYFloatPoint(ILcdPoint aPoint) Constructs and initializes a newTLcdXYFloatPointwith the same location as the specifiedILcdPoint.TLcdXYFloatPoint(Point aPoint) Constructs and initializes a newTLcdXYFloatPointwith the same location as the specifiedjava.awt.Point. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this object, by delegating toObject.clone().Returns a copy of thisILcdBoundsobject that is also anILcd2DEditableBounds.Returns a copy of thisILcdPointthat is also anILcd2DEditablePoint.Returns a copy of thisILcdBoundsobject that is also anILcd3DEditableBounds.Returns a copy of thisILcdPointthat is also anILcd3DEditablePoint.booleancontains2D(double aX, double aY) Checks whether thisALcdPointis equal to the given point in the 2D cartesian plane.booleancontains2D(double aX, double aY, double aWidth, double aHeight) Checks whether thisILcdBoundsobject contains the given rectangle in the 2D space.final doublegetX()Returns the x coordinate of thisILcdPoint.final doublegetY()Returns the y coordinate of thisILcdPoint.voidmove2D(double aX, double aY) Changes the point to have the specified location.toString()Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditablePoint
getZ, move2D, translate2DMethods inherited from class com.luciad.shape.ALcdPoint
contains2D, contains3D, contains3D, contains3D, equals, getBounds, getCosX, getCosY, getDepth, getFocusPoint, getHeight, getLocation, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPoint, getPointCount, getSinX, getSinY, getTanX, getTanY, getWidth, hashCode, interacts2D, interacts2D, interacts3D, interacts3D, isDefinedMethods 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.ILcd2DEditableShape
move2D, translate2DMethods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.shape.ILcdBounds
getCenterMethods inherited from interface com.luciad.shape.ILcdPoint
equals, getCosX, getCosY, getSinX, getSinY, getTanX, getTanY, getZMethods inherited from interface com.luciad.shape.ILcdPointList
getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdXYFloatPoint
public TLcdXYFloatPoint()Constructs and initializes a newTLcdXYFloatPointinitialized with (0, 0). -
TLcdXYFloatPoint
Constructs and initializes a newTLcdXYFloatPointwith the same location as the specifiedjava.awt.Point.- Parameters:
aPoint- the AWT point.
-
TLcdXYFloatPoint
Constructs and initializes a newTLcdXYFloatPointwith the same location as the specifiedILcdPoint.- Parameters:
aPoint- the point.
-
TLcdXYFloatPoint
public TLcdXYFloatPoint(double aX, double aY) Constructs and initializes a newTLcdXYFloatPointwith the specified x and y coordinates.- Parameters:
aX- the x coordinate.aY- the y coordinate.
-
-
Method Details
-
move2D
public void move2D(double aX, double aY) Changes the point to have the specified location.- Specified by:
move2Din interfaceILcd2DEditableShape- Parameters:
aX- the x coordinate of the new location.aY- the y coordinate of the new location.
-
getX
public final double getX()Description copied from interface:ILcdPointReturns the x coordinate of thisILcdPoint. -
getY
public final double getY()Description copied from interface:ILcdPointReturns the y coordinate of thisILcdPoint. -
toString
- Overrides:
toStringin classALcd2DEditablePoint
-
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:
-
cloneAs2DEditablePoint
Description copied from interface:ILcdPointReturns a copy of thisILcdPointthat is also anILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable,- Specified by:
cloneAs2DEditablePointin interfaceILcdPoint- Returns:
- a copy of this
ILcdPointthat is also anILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdPointobject may be read-only. - See Also:
-
cloneAs3DEditablePoint
Description copied from interface:ILcdPointReturns a copy of thisILcdPointthat is also anILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable,- Specified by:
cloneAs3DEditablePointin interfaceILcdPoint- Returns:
- a copy of this
ILcdPointthat is also anILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable, even if the originalILcdPointobject may be read-only. - See Also:
-
cloneAs2DEditableBounds
Description copied from interface:ILcdBoundsReturns a copy of thisILcdBoundsobject that is also anILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only.- Specified by:
cloneAs2DEditableBoundsin interfaceILcdBounds- Returns:
- a copy of this
ILcdBoundsobject that is also anILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only. - See Also:
-
cloneAs3DEditableBounds
Description copied from interface:ILcdBoundsReturns a copy of thisILcdBoundsobject that is also anILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only.- Specified by:
cloneAs3DEditableBoundsin interfaceILcdBounds- Returns:
- a copy of this
ILcdBoundsobject that is also anILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only. - See Also:
-
contains2D
public boolean contains2D(double aX, double aY) Description copied from class:ALcdPointChecks whether thisALcdPointis equal to the given point in the 2D cartesian plane.- Specified by:
contains2Din interfaceILcdShape- Overrides:
contains2Din classALcdPoint- Parameters:
aX- the x coordinate of the point.aY- the y coordinate of the point.- Returns:
- the boolean result of the equality test.
-
contains2D
public boolean contains2D(double aX, double aY, double aWidth, double aHeight) Description copied from interface:ILcdBoundsChecks whether thisILcdBoundsobject contains the given rectangle in the 2D space. Only the first two dimensions of theILcdBoundsobject are considered.If this bounds is
undefined, the result is false.- Specified by:
contains2Din interfaceILcdBounds- Overrides:
contains2Din classALcdPoint- Parameters:
aX- the x coordinate of the rectangle.aY- the y coordinate of the rectangle.aWidth- the width of the rectangle.aHeight- the height of the rectangle.- Returns:
- the boolean result of the containment test.
-