addRectangle

fun addRectangle(minX: Float, minY: Float, minZ: Float, maxX: Float, maxY: Float, maxZ: Float): Hitbox3D

Adds a rectangular hitbox to this hitbox. The resulting hitbox contains all points that are inside either the original hitbox or the new rectangle.

Return

A new Hitbox3D representing the union of the original hitbox and the new rectangle.

Parameters

minX

The minimum x coordinate of the rectangle.

minY

The minimum y coordinate of the rectangle.

minZ

The minimum z coordinate of the rectangle.

maxX

The maximum x coordinate of the rectangle.

maxY

The maximum y coordinate of the rectangle.

maxZ

The maximum z coordinate of the rectangle.