Package snap.gfx3d
Class Bounds3D
java.lang.Object
snap.gfx3d.Bounds3D
- All Implemented Interfaces:
Cloneable
This class represents bounds for 3D shapes (XYZ min/max).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Expands this Box3D to include given point.void
addXYZ
(double aX, double aY, double aZ) Expands this Box3D to include given point.clone()
Override to support Cloneable.copyForMatrix
(Matrix3D aMatrix) Returns a copy of the bounds for given transform.Returns the center point of this box.Point3D[]
Returns the corner points.double
getDepth()
Returns the box depth.double
Returns the box height.double
getMaxX()
Returns the max X value.Returns the max XYZ point.double
getMaxY()
Returns the max Y value.double
getMaxZ()
Returns the max Z value.double
getMidX()
Returns the mid X for the path.double
getMidY()
Returns the mid Y for the path.double
getMidZ()
Returns the mid Z for the path.double
getMinX()
Returns the min X value.Returns the min XYZ point.double
getMinY()
Returns the min Y value.double
getMinZ()
Returns the min Z value.double
getWidth()
Returns the box width.void
setMaxX
(double aValue) Sets the max X value.void
setMaxXYZ
(double aX, double aY, double aZ) Sets the max XYZ.void
setMaxY
(double aValue) Sets the max Y value.void
setMaxZ
(double aValue) Sets the max Z value.void
setMinX
(double aValue) Sets the min X value.void
setMinXYZ
(double aX, double aY, double aZ) Sets the min XYZ.void
setMinY
(double aValue) Sets the min Y value.void
setMinZ
(double aValue) Sets the min Z value.toString()
Standard toString implementation.Standard toStringProps implementation.void
Transforms the path by the given transform3d.
-
Constructor Details
-
Bounds3D
public Bounds3D()Constructor. -
Bounds3D
public Bounds3D(double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) Constructor.
-
-
Method Details
-
getWidth
public double getWidth()Returns the box width. -
getHeight
public double getHeight()Returns the box height. -
getDepth
public double getDepth()Returns the box depth. -
getMinX
public double getMinX()Returns the min X value. -
setMinX
public void setMinX(double aValue) Sets the min X value. -
getMinY
public double getMinY()Returns the min Y value. -
setMinY
public void setMinY(double aValue) Sets the min Y value. -
getMinZ
public double getMinZ()Returns the min Z value. -
setMinZ
public void setMinZ(double aValue) Sets the min Z value. -
getMaxX
public double getMaxX()Returns the max X value. -
setMaxX
public void setMaxX(double aValue) Sets the max X value. -
getMaxY
public double getMaxY()Returns the max Y value. -
setMaxY
public void setMaxY(double aValue) Sets the max Y value. -
getMaxZ
public double getMaxZ()Returns the max Z value. -
setMaxZ
public void setMaxZ(double aValue) Sets the max Z value. -
getMidX
public double getMidX()Returns the mid X for the path. -
getMidY
public double getMidY()Returns the mid Y for the path. -
getMidZ
public double getMidZ()Returns the mid Z for the path. -
getMinXYZ
Returns the min XYZ point. -
setMinXYZ
public void setMinXYZ(double aX, double aY, double aZ) Sets the min XYZ. -
getMaxXYZ
Returns the max XYZ point. -
setMaxXYZ
public void setMaxXYZ(double aX, double aY, double aZ) Sets the max XYZ. -
getCenter
Returns the center point of this box. -
addXYZ
public void addXYZ(double aX, double aY, double aZ) Expands this Box3D to include given point. -
addBox
Expands this Box3D to include given point. -
getCornerPoints
Returns the corner points. -
transform
Transforms the path by the given transform3d. -
copyForMatrix
Returns a copy of the bounds for given transform. -
clone
Override to support Cloneable. -
toString
Standard toString implementation. -
toStringProps
Standard toStringProps implementation.
-