Package com.luciad.shape.shape3D
Class TLcdXYZFloatBounds
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.ALcdBounds
com.luciad.shape.shape2D.ALcd2DEditableBounds
com.luciad.shape.shape3D.ALcd3DEditableBounds
com.luciad.shape.shape3D.TLcdXYZFloatBounds
- All Implemented Interfaces:
ILcdBounded
,ILcdBounds
,ILcdShape
,ILcd2DEditableBounds
,ILcd2DEditableShape
,ILcd3DEditableBounds
,ILcd3DEditableShape
,ILcdCloneable
,Serializable
,Cloneable
This class provides an implementation of
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.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs 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. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this object, by delegating toObject.clone()
.Returns a copy of thisILcdBounds
object that is also anILcd2DEditableBounds
.Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
.final double
getDepth()
Returns the depth of the bounding box.final double
Returns the height of the bounding box.final ILcdPoint
Returns the location of the bounding box (smallest x and y coordinates).final double
getWidth()
Returns the width of the bounding box.void
move3D
(double aX, double aY, double aZ) Moves thisILcd3DEditableShape
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).Methods inherited from class com.luciad.shape.shape3D.ALcd3DEditableBounds
move2D, move3D, setTo3DIntersection, setTo3DIntersection, setTo3DUnion, setTo3DUnion, setToIncludePoint3D, setToIncludePoint3D, toString, translate3D
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableBounds
isDefined, move2D, setDefined, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, translate2D
Methods inherited from class com.luciad.shape.ALcdBounds
contains2D, contains2D, contains2D, contains3D, contains3D, contains3D, equals, fromDomainObject, getBounds, getFocusPoint, hashCode, interacts2D, interacts2D, interacts3D, interacts3D, isDefined, isDefined
Methods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableBounds
move2D, move2D, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, translate2D
Methods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableBounds
move3D, setTo3DIntersection, setTo3DIntersection, setTo3DUnion, setTo3DUnion, setToIncludePoint3D, setToIncludePoint3D, translate3D
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.shape.ILcdBounds
contains2D, contains2D, contains3D, contains3D, getCenter, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, interacts2D, interacts2D, interacts3D, interacts3D, isDefined
Methods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdXYZFloatBounds
public TLcdXYZFloatBounds(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth) Constructs and initializes a box with the specified parameters.- Parameters:
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.
-
TLcdXYZFloatBounds
public TLcdXYZFloatBounds()Constructs a new box, initialized to location (0, 0, 0) and size (0, 0, 0).The
defined
status of the instance isfalse
. -
TLcdXYZFloatBounds
Constructs a new box, initialized to match the values of the specified box.The
defined
status of the instance is also copied from the specified bounds.- Parameters:
aBounds
- a box from which to copy initial values.
-
TLcdXYZFloatBounds
Constructs a new box, initialized to match the values of the specified box.- Parameters:
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.
-
TLcdXYZFloatBounds
Constructs a box and initializes it to the specified point.- Parameters:
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.
-
TLcdXYZFloatBounds
Constructs a box with zero width and height at the specified point.- Parameters:
aPoint
- the lower left point of the box.
-
-
Method Details
-
getLocation
Description copied from interface:ILcdBounds
Returns the location of the bounding box (smallest x and y coordinates).- Specified by:
getLocation
in interfaceILcdBounds
- Returns:
- the location of the bounding box.
-
getWidth
public final double getWidth()Description copied from interface:ILcdBounds
Returns the width of the bounding box. The width has to be larger than or equal to 0.- Specified by:
getWidth
in interfaceILcdBounds
- Returns:
- the width of the bounding box.
-
setWidth
public void setWidth(double aWidth) Description copied from interface:ILcd2DEditableBounds
Sets the width of the bounds (the extent along the x-axis).If this bounds was
undefined
, it becomes defined.- Specified by:
setWidth
in interfaceILcd2DEditableBounds
- Parameters:
aWidth
- the new width.
-
getHeight
public final double getHeight()Description copied from interface:ILcdBounds
Returns the height of the bounding box. The height has to be larger than or equal to 0.- Specified by:
getHeight
in interfaceILcdBounds
- Returns:
- the height of the bounding box.
-
setHeight
public void setHeight(double aHeight) Description copied from interface:ILcd2DEditableBounds
Sets the height of the bounds (the extent along the y-axis).If this bounds was
undefined
, it becomes defined.- Specified by:
setHeight
in interfaceILcd2DEditableBounds
- Parameters:
aHeight
- the new height.
-
getDepth
public final double getDepth()Description copied from interface:ILcdBounds
Returns the depth of the bounding box. The depth has to be larger than or equal to 0.- Specified by:
getDepth
in interfaceILcdBounds
- Overrides:
getDepth
in classALcd2DEditableBounds
- Returns:
- 0.
-
setDepth
public void setDepth(double aDepth) Description copied from interface:ILcd3DEditableBounds
Sets the depth of the bounds (the extent along the z-axis).If this bounds is
undefined
, it becomes defined.- Specified by:
setDepth
in interfaceILcd3DEditableBounds
- Parameters:
aDepth
- the new depth.
-
move3D
public void move3D(double aX, double aY, double aZ) Description copied from interface:ILcd3DEditableBounds
Moves thisILcd3DEditableShape
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.- Specified by:
move3D
in interfaceILcd3DEditableBounds
- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.
-
clone
Description copied from class:ALcdShape
Creates 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:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classALcdShape
- See Also:
-
cloneAs2DEditableBounds
Description copied from interface:ILcdBounds
Returns a copy of thisILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Specified by:
cloneAs2DEditableBounds
in interfaceILcdBounds
- Returns:
- a copy of this
ILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only. - See Also:
-
cloneAs3DEditableBounds
Description copied from interface:ILcdBounds
Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Specified by:
cloneAs3DEditableBounds
in interfaceILcdBounds
- Returns:
- a copy of this
ILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only. - See Also:
-