Companion

object Companion

Functions

Link copied to clipboard
fun cube(x: Float, y: Float, z: Float, size: Float): Hitbox3D
fun cube(x: Int, y: Int, z: Int, size: Int): Hitbox3D

Creates a cubic hitbox defined by its starting point and size.

Link copied to clipboard

Creates an empty hitbox that contains no points.

Link copied to clipboard
fun full(): Hitbox3D

Creates a full hitbox that contains all points.

Link copied to clipboard
fun rectangle(minX: Float, minY: Float, minZ: Float, maxX: Float, maxY: Float, maxZ: Float): Hitbox3D
fun rectangle(minX: Int, minY: Int, minZ: Int, maxX: Int, maxY: Int, maxZ: Int): Hitbox3D

Creates a rectangular hitbox defined by its minimum and maximum x, y, and z coordinates.

Link copied to clipboard
fun rotatedCube(x: Float, y: Float, z: Float, size: Float, degreesX: Float, degreesY: Float, degreesZ: Float): Hitbox3D
fun rotatedCube(x: Int, y: Int, z: Int, size: Int, degreesX: Float, degreesY: Float, degreesZ: Float): Hitbox3D

Creates a rotated cubic hitbox defined by its starting point, size, and rotation angles.

Link copied to clipboard
fun rotatedRectangle(x: Float, y: Float, z: Float, width: Float, height: Float, depth: Float, pitch: Float, yaw: Float, roll: Float, centerX: Float = x + width / 2f, centerY: Float = y + height / 2f, centerZ: Float = z + depth / 2f): Hitbox3D

Creates a rotated rectangular hitbox defined by its minimum and maximum x, y, and z coordinates and rotation angles.

Link copied to clipboard
fun sphere(x: Float, y: Float, z: Float, radius: Float): Hitbox3D

Creates a spherical hitbox defined by its center and radius.

Link copied to clipboard
fun transformedRectangle(x: Float, y: Float, z: Float, width: Float, height: Float, depth: Float, transform: Matrix4): Hitbox3D

Creates a transformed rectangular hitbox defined by its position, size, and transformation matrix.