NullBounds represents a debug bounding "volume" that is either considered always in, or always out of the frustum. NullBounds is useful for entities that are always considered in the frustum, such as directional lights or skyboxes.

Constructor

@:value({ renderable : null, alwaysIn : true })new(alwaysIn:Bool = true, ?renderable:WireframePrimitiveBase)

Methods

fromExtremes(minX:Float, minY:Float, minZ:Float, maxX:Float, maxY:Float, maxZ:Float):Void

@inheritDoc

fromGeometry(geometry:Geometry):Void

@inheritDoc

fromSphere(center:Vector3D, radius:Float):Void

@inheritDoc

isInFrustum(planes:Vector<Plane3D>, numPlanes:Int):Bool

@inheritDoc

Inherited Variables

Defined by BoundingVolumeBase

read onlyaabbPoints:Vector<Float>

read onlymax:Vector3D

read onlymin:Vector3D

Inherited Methods

Defined by BoundingVolumeBase

containsPoint(position:Vector3D):Bool

Method for calculating whether the given position is contained within the bounding volume.

Parameters:

position

The position in local coordinates to be checked.

Returns:

A Boolean value representing the detection of a contained position.

disposeRenderable():Void

Disposes of the bounds renderable object. Used to clear memory after a bounds rendeable is no longer required.

fromVertices(vertices:Vector<Float>):Void

Updates the bounds to fit a list of vertices

Parameters:

vertices

A Vector.<Number> of vertex data to be bounded.

nullify():Void

Sets the bounds to zero size.

overlaps(bounds:BoundingVolumeBase):Bool

Tests if the bounds overlap other bounds, treating both bounds as AABBs.

rayIntersection(position:Vector3D, direction:Vector3D, targetNormal:Vector3D):Float

Method for calculating whether an intersection of the given ray occurs with the bounding volume.

Parameters:

position

The starting position of the casting ray in local coordinates.

direction

A unit vector representing the direction of the casting ray in local coordinates.

targetNormal

The vector to store the bounds' normal at the point of collision

Returns:

A Boolean value representing the detection of an intersection.