Box4

class Box4 : Box<Vec4, Box4> (source)

Represents a four-dimensional bounding box defined by two Vec4 points. This class extends the abstract class Box, which provides common functionality for multi-dimensional bounding boxes. The box is defined by its lower and upper bounds in 4D space.

This class provides additional capabilities for extracting lower-dimensional bounding boxes (e.g., 3D and 2D boxes), creating empty boxes, and determining spatial relationships such as containment and intersection.

Parameters

ax

The x-coordinate of the first point.

ay

The y-coordinate of the first point.

az

The z-coordinate of the first point.

aw

The w-coordinate of the first point.

bx

The x-coordinate of the second point.

by

The y-coordinate of the second point.

bz

The z-coordinate of the second point.

bw

The w-coordinate of the second point.

Constructors

Link copied to clipboard
constructor(a: Vec4, b: Vec4)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isEmpty: Boolean

Functions

Link copied to clipboard
fun box2(): Box2
Link copied to clipboard
operator fun contains(v: Vec4): Boolean
Link copied to clipboard
fun distance(point: Vec4): Double
Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun expand(t: Double): Box4
fun expand(v: Vec4): Box4
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
open fun intersects(b: Box4): Boolean
Link copied to clipboard
fun lerp(t: Double): Vec4
fun lerp(v: Vec4): Vec4
Link copied to clipboard
open override fun lower(): Vec4
Link copied to clipboard
fun nth(idx: Int): Interval
Link copied to clipboard
fun scale(v: Vec4): Box4
Link copied to clipboard
fun size(): Vec4
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
fun union(b: Box4): Box4
fun union(v: Vec4): Box4
Link copied to clipboard
open override fun upper(): Vec4