Box3D Class

class plask.geometry.Box3D(back, left, bottom, front, right, top)
class plask.geometry.Box3D
class plask.geometry.Box3D(lower, upper)

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.

Box3D.translated(trans)

Get translated copy of this box.

Parameters:

trans (plask.vec) – Translation vector.

Attribute Details

Box3D.back = <property object>

Back edge of the box.

Box3D.bottom = <property object>

Bottom edge of the box.

Box3D.center = <property object>

Center of the box.

Box3D.depth = <property object>

Depth of the box.

Box3D.front = <property object>

Front edge of the box.

Box3D.height = <property object>

Height of the box.

Box3D.left = <property object>

Left edge of the box.

Box3D.lower = <property object>

Closer lower left corner of the box.

Box3D.right = <property object>

Right edge of the box.

Box3D.size = <property object>

Size of the box.

Box3D.top = <property object>

Top edge of the box.

Box3D.upper = <property object>

Farther upper right corner of the box.

Box3D.width = <property object>

Width of the box.