Package georegression.struct.shapes
Class Box3D_F32
java.lang.Object
georegression.struct.shapes.Box3D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.shapes.Box3D_F64")
public class Box3D_F32
extends Object
implements Serializable
An axis aligned box in 3D that is specified by two points, p0 and p1, the lower and upper extents of the box.
Point p0 is less or equal to point p1, 0.x ≤ p1.x, p0.y ≤ p1.y, p0.z ≤ p1.z.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionThe lower point/extent.The upper point/extent -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
area()
The box's area.center
(@Nullable Point3D_F32 storage) Computes and return the center of the cube.float
Length of the box along the x-axisfloat
Length of the box along the y-axisfloat
Length of the box along the z-axisboolean
isEquals
(float x0, float y0, float z0, float x1, float y1, float z1, float tol) Returns true if all the extents are within tolerance.boolean
Returns true if all the extents are within tolerance.void
setP0
(Point3D_F32 p0) void
setP1
(Point3D_F32 p1) setTo
(float x0, float y0, float z0, float x1, float y1, float z1) toString()
void
zero()
-
Field Details
-
p0
The lower point/extent. -
p1
The upper point/extent
-
-
Constructor Details
-
Box3D_F32
public Box3D_F32(float x0, float y0, float z0, float x1, float y1, float z1) -
Box3D_F32
-
Box3D_F32
public Box3D_F32()
-
-
Method Details
-
setTo
-
setTo
-
zero
public void zero() -
isEquals
Returns true if all the extents are within tolerance.- Parameters:
r
- Boxtol
- tolerance for equality. To be equal the difference must be less than or equal to this- Returns:
- true if equal or false if not
-
isEquals
public boolean isEquals(float x0, float y0, float z0, float x1, float y1, float z1, float tol) Returns true if all the extents are within tolerance.- Parameters:
x0
- lower extent. x-axisy0
- lower extent. y-axisx1
- upper extent. x-axisy1
- upper extent. y-axistol
- tolerance for equality. To be equal the difference must be less than or equal to this- Returns:
- true if equal or false if not
-
area
public float area()The box's area. area = lengthX*lengthY*lengthZ- Returns:
- area
-
getLengthX
public float getLengthX()Length of the box along the x-axis- Returns:
- length
-
getLengthY
public float getLengthY()Length of the box along the y-axis- Returns:
- length
-
getLengthZ
public float getLengthZ()Length of the box along the z-axis- Returns:
- length
-
setP1
-
setP0
-
center
Computes and return the center of the cube.- Parameters:
storage
- Optional storage for the center. If null a new instance will be created and returned.- Returns:
- The cube's center point
-
toString
-