Box3D Class¶
-
class
plask.geometry.
Box3D
(lower, upper)¶ -
class
plask.geometry.
Box3D
-
class
plask.geometry.
Box3D
(back, left, bottom, front, right, top) Cuboidal three-dimensional box.
This class holds a cuboidal box with its sides along the axes. It provides some basic geometric operations and is used mainly to represent 3D geometry bounding boxes.
Parameters: - lower (plask.vec) – Back lower left corner of the box.
- upper (plask.ver) – Front upper right corner of the box.
- back (float) – Back edge of the box.
- left (float) – Left edge of the box.
- bottom (float) – Bottom edge of the box.
- front (float) – Front edge of the box.
- right (float) – Right edge of the box.
- top (float) – Top edge of the box.
Methods¶
contains (point) |
Check if the point is inside the box. |
extension (other) |
Get the minimal box which include both this and other box. |
intersection (other) |
Get the biggest box which is included in both this and the other box. |
intersects (arg2) |
Check if this and the other box have common points.Args: other (plask.geometry.Box3D): Box to check common points with. |
translated (trans) |
Get translated copy of this box. |
Attributes¶
back |
Back edge of the box. |
bottom |
Bottom edge of the box. |
center |
Center of the box. |
depth |
Depth of the box. |
front |
Front edge of the box. |
height |
Height of the box. |
left |
Left edge of the box. |
lower |
Closer lower left corner of the box. |
right |
Right edge of the box. |
size |
Size of the box. |
top |
Top edge of the box. |
upper |
Farther upper right corner of the box. |
width |
Width of the box. |
Descriptions¶
Method Details¶
-
Box3D.
contains
(point)¶ Check if the point is inside the box.
Parameters: point (plask.vec) – Point to test.
-
Box3D.
extension
(other)¶ Get the minimal box which include both this and other box.
Parameters: other (plask.geometry.Box3D) – Box.
-
Box3D.
intersection
(other)¶ Get the biggest box which is included in both this and the other box.
Parameters: other (plask.geometry.Box3D) – Box to make intersection with.
-
Box3D.
intersects
(arg2)¶ Check if this and the other box have common points.Args: other (plask.geometry.Box3D): Box to check common points with.
Attribute Details¶
-
Box3D.
back
¶ Back edge of the box.
-
Box3D.
bottom
¶ Bottom edge of the box.
-
Box3D.
center
¶ Center of the box.
-
Box3D.
depth
¶ Depth of the box.
-
Box3D.
front
¶ Front edge of the box.
-
Box3D.
height
¶ Height of the box.
-
Box3D.
left
¶ Left edge of the box.
-
Box3D.
lower
¶ Closer lower left corner of the box.
-
Box3D.
right
¶ Right edge of the box.
-
Box3D.
size
¶ Size of the box.
-
Box3D.
top
¶ Top edge of the box.
-
Box3D.
upper
¶ Farther upper right corner of the box.
-
Box3D.
width
¶ Width of the box.