box

A cuboidal solid or a general hexahedral body with six tetragonal faces sharing eight corners.

Signatures

  • box()
  • box( float width, float depth, float height )
  • box( float minX, float maxX, float minY, float maxY, float minZ, float maxZ )
  • box( vector corner1, vector corner2, vector corner3, vector corner4, vector corner5, vector corner6, vector corner7, vector corner8 )
  • box( float width, float depth, float height, vector position )

Details

Constructor (4) requires the eight points to be defined in the right order, as is shown in the figure. If the given order leads to self-intersections, the program throws a warning and tries to automatically adjust correct the point order. Constructor (1) generates a cube with edge length 1 with the corner with the minimal values of X, Y, Z at the origin <[0,0,0]>. Constructors (2), (3) and (5) generate axis-aligned boxes with with variant sizes in X (width), Y (depth) and Z (height) directions.

Box corners order of constructor (4).

Casts To

solid

Parameters

width

Extension of the box in X direction.

depth

Extension of the box in Y direction.

height

Extension of the box in Z direction.

minX

Lower boundary of the box in X direction.

maxX

Upper boundary of the box in X direction.

minY

Lower boundary of the box in Y direction.

maxY

Upper boundary of the box in Y direction.

minZ

Lower boundary of the box in Z direction.

maxZ

Upper boundary of the box in Z direction.

corner*

One of the eight corners of the arbitrary points constructor.

position

Translation vector that is applied to the box.