Box3

THREE.Box3
class Box3(val min: UndefOr[Vector3], val max: UndefOr[Vector3]) extends Object

Represents an axis-aligned bounding box (AABB) in 3D space.

Attributes

Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def applyMatrix4(matrix: Object): this.type

Transforms box by 4x4 matrix.

Transforms box by 4x4 matrix.

Attributes

def clampPoint(point: Vector3, target: Vector3): Vector3

Clamps a point within box bounds.

Clamps a point within box bounds.

Attributes

def containsBox(box: Box3): Boolean

Tests if box contains another box entirely.

Tests if box contains another box entirely.

Attributes

def containsPoint(point: Vector3): Boolean

Tests if point is inside box.

Tests if point is inside box.

Attributes

def copy(box: Box3): this.type

Copies values from another box.

Copies values from another box.

Attributes

def distanceToPoint(point: Vector3): Double

Returns distance from box edge to point.

Returns distance from box edge to point.

Attributes

def equals(box: Box3): Boolean

Tests equality with another box.

Tests equality with another box.

Attributes

def expandByObject(obj: Object, precise: Boolean): this.type

Expands box to include the given object and its children.

Expands box to include the given object and its children.

Attributes

def expandByPoint(point: Vector3): this.type

Expands box to include the given point.

Expands box to include the given point.

Attributes

def expandByScalar(scalar: Double): this.type

Expands box by scalar amount.

Expands box by scalar amount.

Attributes

def expandByVector(vector: Vector3): this.type

Expands box equilaterally by the given vector.

Expands box equilaterally by the given vector.

Attributes

def getBoundingSphere(target: Object): Object

Returns a bounding sphere enclosing this box.

Returns a bounding sphere enclosing this box.

Attributes

def getCenter(target: Vector3): Vector3

Returns the center point of this box.

Returns the center point of this box.

Attributes

def getParameter(point: Vector3, target: Vector3): Vector3

Returns point as a proportion of box's dimensions.

Returns point as a proportion of box's dimensions.

Attributes

def getSize(target: Vector3): Vector3

Returns the dimensions of this box.

Returns the dimensions of this box.

Attributes

def intersect(box: Box3): this.type

Computes intersection with another box.

Computes intersection with another box.

Attributes

def intersectsBox(box: Box3): Boolean

Tests if box intersects with another box.

Tests if box intersects with another box.

Attributes

def intersectsPlane(plane: Object): Boolean

Tests if box intersects with a plane.

Tests if box intersects with a plane.

Attributes

def intersectsSphere(sphere: Object): Boolean

Tests if box intersects with a sphere.

Tests if box intersects with a sphere.

Attributes

def intersectsTriangle(triangle: Object): Boolean

Tests if box intersects with a triangle.

Tests if box intersects with a triangle.

Attributes

def isEmpty(): Boolean

Checks if this box is empty.

Checks if this box is empty.

Attributes

def jsClone(): Box3

Returns a clone of this box.

Returns a clone of this box.

Attributes

def makeEmpty(): this.type

Makes this box empty.

Makes this box empty.

Attributes

def set(min: Vector3, max: Vector3): this.type

Sets the lower and upper boundaries of this box.

Sets the lower and upper boundaries of this box.

Attributes

def setFromArray(array: Array[Double]): this.type

Sets box bounds to enclose all positions in the given array.

Sets box bounds to enclose all positions in the given array.

Attributes

def setFromBufferAttribute(attribute: Object): this.type

Sets box bounds from the given buffer attribute.

Sets box bounds from the given buffer attribute.

Attributes

def setFromCenterAndSize(center: Vector3, size: Vector3): this.type

Centers this box on the given center vector with the given size.

Centers this box on the given center vector with the given size.

Attributes

def setFromObject(obj: Object, precise: Boolean): this.type

Sets box bounds from the given 3D object.

Sets box bounds from the given 3D object.

Attributes

def setFromPoints(points: Array[Vector3]): this.type

Sets box bounds to enclose all points in the array.

Sets box bounds to enclose all points in the array.

Attributes

def translate(offset: Vector3): this.type

Translates box by offset vector.

Translates box by offset vector.

Attributes

def union(box: Box3): this.type

Computes union with another box.

Computes union with another box.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

val isBox3: Boolean

Flag that can be used for type testing.

Flag that can be used for type testing.

Attributes

val max: UndefOr[Vector3]
val min: UndefOr[Vector3]