public class TLcdXYZFloatBounds extends ALcd3DEditableBounds implements ILcd3DEditableBounds
ILcd3DEditableBounds
in
the cartesian space.
This class is thread-hostile, even for read-only access, since point instances are being reused from an internal pool.
Constructor and Description |
---|
TLcdXYZFloatBounds()
Constructs a new box, initialized to location (0, 0, 0) and
size (0, 0, 0).
|
TLcdXYZFloatBounds(double aX,
double aY,
double aZ,
double aWidth,
double aHeight,
double aDepth)
Constructs and initializes a box with the specified parameters.
|
TLcdXYZFloatBounds(ILcdBounds aBounds)
Constructs a new box, initialized to match the values of
the specified box.
|
TLcdXYZFloatBounds(ILcdBounds aBounds,
double aZ,
double aDepth)
Constructs a new box, initialized to match the values of
the specified box.
|
TLcdXYZFloatBounds(ILcdPoint aPoint)
Constructs a box with zero width and height at the specified point.
|
TLcdXYZFloatBounds(ILcdPoint aPoint,
double aWidth,
double aHeight,
double aDepth)
Constructs a box and initializes it to the specified 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 . |
ILcd3DEditableBounds |
cloneAs3DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd3DEditableBounds . |
double |
getDepth()
Returns the depth of the bounding box.
|
double |
getHeight()
Returns the height of the bounding box.
|
ILcdPoint |
getLocation()
Returns the location of the bounding box (smallest x and y coordinates).
|
double |
getWidth()
Returns the width of the bounding box.
|
void |
move3D(double aX,
double aY,
double aZ)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
setDepth(double aDepth)
Sets the depth of the bounds (the extent along the z-axis).
|
void |
setHeight(double aHeight)
Sets the height of the bounds (the extent along the y-axis).
|
void |
setWidth(double aWidth)
Sets the width of the bounds (the extent along the x-axis).
|
move2D, move3D, setTo3DIntersection, setTo3DIntersection, setTo3DUnion, setTo3DUnion, setToIncludePoint3D, setToIncludePoint3D, toString, translate3D
isDefined, move2D, setDefined, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, translate2D
contains2D, contains2D, contains2D, contains3D, contains3D, contains3D, equals, fromDomainObject, getBounds, getFocusPoint, hashCode, interacts2D, interacts2D, interacts3D, interacts3D, isDefined, isDefined
contains2D, contains3D
finalize, getClass, notify, notifyAll, wait, wait, wait
move3D, setTo3DIntersection, setTo3DIntersection, setTo3DUnion, setTo3DUnion, setToIncludePoint3D, setToIncludePoint3D, translate3D
move2D, move2D, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, translate2D
contains2D, contains2D, contains3D, contains3D, getCenter, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, interacts2D, interacts2D, interacts3D, interacts3D, isDefined
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
public TLcdXYZFloatBounds(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
aX
- the x coordinate of the lower left point.aY
- the y coordinate of the lower left point.aZ
- the z coordinate of the lower left point.aWidth
- the width of the box.aHeight
- the height of the box.aDepth
- the depth of the box.public TLcdXYZFloatBounds()
The defined
status of the instance is false
.
public TLcdXYZFloatBounds(ILcdBounds aBounds)
The defined
status of the instance is also copied from the specified bounds.
aBounds
- a box from which to copy initial values.public TLcdXYZFloatBounds(ILcdBounds aBounds, double aZ, double aDepth)
aBounds
- 2D or 3D bounds from which to copy the 2D coordinates.aZ
- the new z coordinate of the location.aDepth
- the new depth of the box.public TLcdXYZFloatBounds(ILcdPoint aPoint, double aWidth, double aHeight, double aDepth)
aPoint
- the lower left point of the box.aWidth
- the width of the box.aHeight
- the height of the box.aDepth
- the depth of the box.public TLcdXYZFloatBounds(ILcdPoint aPoint)
aPoint
- the lower left point of the box.public final ILcdPoint getLocation()
ILcdBounds
getLocation
in interface ILcdBounds
public final double getWidth()
ILcdBounds
getWidth
in interface ILcdBounds
public void setWidth(double aWidth)
ILcd2DEditableBounds
If this bounds was undefined
, it becomes defined.
setWidth
in interface ILcd2DEditableBounds
aWidth
- the new width.public final double getHeight()
ILcdBounds
getHeight
in interface ILcdBounds
public void setHeight(double aHeight)
ILcd2DEditableBounds
If this bounds was undefined
, it becomes defined.
setHeight
in interface ILcd2DEditableBounds
aHeight
- the new height.public final double getDepth()
ILcdBounds
getDepth
in interface ILcdBounds
getDepth
in class ALcd2DEditableBounds
public void setDepth(double aDepth)
ILcd3DEditableBounds
If this bounds is undefined
, it becomes defined.
setDepth
in interface ILcd3DEditableBounds
aDepth
- the new depth.public void move3D(double aX, double aY, double aZ)
ILcd3DEditableBounds
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.
If this bounds was undefined
, it becomes defined after the move.
move3D
in interface ILcd3DEditableBounds
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 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 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