public class TLcdXYZPoint extends ALcd3DEditablePoint implements ILcd3DEditablePoint
ILcd3DEditablePoint
in
the cartesian space.
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.
TLcdXYZPoint
as a domain object (e.g. using ILcdModel.addElement),
please note that two TLcdXYZPoint
instances are considered to be equal if they describe
the same location. If location does not uniquely identify your domain objects, please override
equals
/hashcode
to take the additional properties into account.
Alternatively, one could consider every class instance different, resulting in these
equals
/hashcode
implementations:
public boolean equals( Object aObject ) {
return aObject == this;
}
public int hashCode() {
return System.identityHashCode( this );
}
Failing to respect equals/hashcode may result in undesired behavior, for example when performing
spatial queries, used during painting.Constructor and Description |
---|
TLcdXYZPoint()
Constructs a new
TLcdXYZPoint at location (0,0,0). |
TLcdXYZPoint(double aX,
double aY,
double aZ)
Constructs and initializes a new
TLcdXYPoint with the specified x, y, and z
coordinates. |
TLcdXYZPoint(ILcdPoint aPoint)
Constructs and initializes a new
TLcdXYZPoint with the same location as
the given ILcdPoint . |
TLcdXYZPoint(ILcdPoint aPoint,
double aZ)
Constructs and initializes a new
TLcdXYZPoint at the given
location. |
Modifier and Type | Method and Description |
---|---|
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 . |
double |
getX()
Returns the x coordinate of this
ILcdPoint . |
double |
getY()
Returns the y coordinate of this
ILcdPoint . |
double |
getZ()
Returns the z coordinate of this
ILcdPoint . |
void |
move3D(double aX,
double aY,
double aZ)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
move2D, move3D, toString, translate3D
move2D, translate2D
contains2D, contains2D, 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
clone, contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getCosX, getCosY, getSinX, getSinY, getTanX, getTanY
move3D, translate3D
move2D, move2D, translate2D
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
clone
getPointSFCT, getX, getY, getZ
getCenter
public TLcdXYZPoint()
TLcdXYZPoint
at location (0,0,0).public TLcdXYZPoint(ILcdPoint aPoint)
TLcdXYZPoint
with the same location as
the given ILcdPoint
.aPoint
- the point to be copied.public TLcdXYZPoint(ILcdPoint aPoint, double aZ)
TLcdXYZPoint
at the given
location.aPoint
- the point to be copied of which the first two coordinates will
be used.aZ
- the third coordinate.public TLcdXYZPoint(double aX, double aY, double aZ)
TLcdXYPoint
with the specified x, y, and z
coordinates.aX
- the x coordinate.aY
- the y coordinate.aZ
- the z coordinate.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 final double getX()
ILcdPoint
ILcdPoint
.public final double getY()
ILcdPoint
ILcdPoint
.public final double getZ()
ILcdPoint
ILcdPoint
.getZ
in interface ILcdPoint
getZ
in class ALcd2DEditablePoint
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