Box

open class Box : CollisionShape

Mathematical representation of a box. Used to perform intersection and collision tests against oriented boxes.

Constructors

Link copied to clipboard
constructor()
Create a box with a center of (0,0,0) and a size of (1,1,1).
constructor(size: Vector3)
Create a box with a center of (0,0,0) and a specified size.
constructor(size: Vector3, center: Vector3)
Create a box with a specified center and size.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun getExtents(): Vector3
Calculate the extents (half the size) of the box.
Link copied to clipboard
Get a copy of the box's rotation.
Link copied to clipboard
open fun makeCopy(): Box
Link copied to clipboard
open fun rayIntersection(ray: Ray, result: RayHit): Boolean
Link copied to clipboard
open fun setRotation(rotation: Quaternion)
Set the rotation of this box.
Link copied to clipboard