public class TLcdXYFloatPoint extends ALcd2DEditablePoint implements ILcd2DEditablePoint
ILcd2DEditablePoint
in
the cartesian space, but internally using floats instead of doubles.
This class is thread-safe for read-only access.
Constructor and Description |
---|
TLcdXYFloatPoint()
Constructs and initializes a new
TLcdXYFloatPoint initialized with (0, 0). |
TLcdXYFloatPoint(double aX,
double aY)
Constructs and initializes a new
TLcdXYFloatPoint with the specified x and y
coordinates. |
TLcdXYFloatPoint(ILcdPoint aPoint)
Constructs and initializes a new
TLcdXYFloatPoint with the same location as
the specified ILcdPoint . |
TLcdXYFloatPoint(Point aPoint)
Constructs and initializes a new
TLcdXYFloatPoint with the same location as
the specified java.awt.Point . |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this object, by delegating to
Object.clone() . |
ILcd2DEditableBounds |
cloneAs2DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd2DEditableBounds . |
ILcd2DEditablePoint |
cloneAs2DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd2DEditablePoint . |
ILcd3DEditableBounds |
cloneAs3DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd3DEditableBounds . |
ILcd3DEditablePoint |
cloneAs3DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd3DEditablePoint . |
boolean |
contains2D(double aX,
double aY)
Checks whether this
ALcdPoint is equal to the given point in
the 2D cartesian plane. |
boolean |
contains2D(double aX,
double aY,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object contains the given rectangle in
the 2D space. |
double |
getX()
Returns the x coordinate of this
ILcdPoint . |
double |
getY()
Returns the y coordinate of this
ILcdPoint . |
void |
move2D(double aX,
double aY)
Changes the point to have the specified location.
|
String |
toString() |
getZ, move2D, translate2D
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, isDefined
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getCosX, getCosY, getSinX, getSinY, getTanX, getTanY, getZ
move2D, translate2D
contains2D, contains3D, contains3D, getFocusPoint
getBounds
getPointSFCT, getX, getY, getZ
getCenter
public TLcdXYFloatPoint()
TLcdXYFloatPoint
initialized with (0, 0).public TLcdXYFloatPoint(Point aPoint)
TLcdXYFloatPoint
with the same location as
the specified java.awt.Point
.aPoint
- the AWT point.public TLcdXYFloatPoint(ILcdPoint aPoint)
TLcdXYFloatPoint
with the same location as
the specified ILcdPoint
.aPoint
- the point.public TLcdXYFloatPoint(double aX, double aY)
TLcdXYFloatPoint
with the specified x and y
coordinates.aX
- the x coordinate.aY
- the y coordinate.public void move2D(double aX, double aY)
move2D
in interface ILcd2DEditableShape
aX
- the x coordinate of the new location.aY
- the y coordinate of the new location.public final double getX()
ILcdPoint
ILcdPoint
.public final double getY()
ILcdPoint
ILcdPoint
.public String toString()
toString
in class ALcd2DEditablePoint
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 ILcd2DEditablePoint cloneAs2DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,cloneAs2DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd2DEditablePoint
public ILcd3DEditablePoint cloneAs3DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,cloneAs3DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd3DEditablePoint
public ILcd2DEditableBounds cloneAs2DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs2DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd2DEditableBounds
public ILcd3DEditableBounds cloneAs3DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs3DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd3DEditableBounds
public boolean contains2D(double aX, double aY)
ALcdPoint
ALcdPoint
is equal to the given point in
the 2D cartesian plane.contains2D
in interface ILcdShape
contains2D
in class ALcdPoint
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains2D(double aX, double aY, double aWidth, double aHeight)
ILcdBounds
ILcdBounds
object contains the given rectangle in
the 2D space. Only the first two dimensions of the ILcdBounds
object
are considered.
If this bounds is undefined
, the result is false.
contains2D
in interface ILcdBounds
contains2D
in class ALcdPoint
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.