An abstract base object for all bounding volume objects. It should not be instantiated directly.


Created BoundingVolumeBase object has properties:

aabbPoints

[read-only] Returns a vector of values representing the concatenated cartesian triplet of the 8 axial extremities of the bounding volume. Vector array of floats.

boundingRenderable

[read-only] Returns the bounding renderable object for the bounding volume, in cases where the showBounds property of the entity is set to true. (WireframePrimitiveBase)

max

[read-only] The maximum extreme of the bounds (Vector3D)

min

[read-only] The minimum extreme of the bounds (Vector3D)


methods:

classifyToPlane(plane)

Return Int

plane - (Plane3D)

clone()

Clones the current BoundingVolume object


containsPoint(position)

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

position - The position in local coordinates to be checked. (Vector3D)

disposeRenderable()

Disposes of the bounds renderable object.


fromExtremes(minX, minY, minZ, maxX, maxY, maxZ)

Sets the bounds to the given extrema.

minX - The minimum x value of the bounds

minY - The minimum y value of the bounds

minZ - The minimum z value of the bounds

maxX - The maximum x value of the bounds

maxY - The maximum y value of the bounds

maxZ - The maximum z value of the bounds

fromGeometry(geometry)

Updates the bounds to fit a Geometry object.

geometry - The Geometry object to be bounded.

fromSphere(center, radius)

Sets the bound to fit a given sphere.

center - The center of the sphere to be bounded (Vector3D)

radius - The radius of the sphere to be bounded

fromVertices(vertices)

Updates the bounds to fit a list of vertices

vertices - A Vector array of floats of vertex data to be bounded.

isInFrustum(planes, numPlanes)

Tests if the bounds are in the camera frustum. Return Boolean

planes - The model view projection matrix for the object to which this bounding box belongs. Vector array of (Plane3D)

numPlanes - Int

nullify()

Sets the bounds to zero size.


overlaps(bounds)

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

bounds - (BoundingVolumeBase)

rayIntersection(position, direction, targetNormal)

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

position - The starting position of the casting ray in local coordinates. (Vector3D)

direction - A unit vector representing the direction of the casting ray in local coordinates. (Vector3D)

targetNormal - The vector to store the bounds' normal at the point of collision (Vector3D)

transformFrom(bounds, matrix)


bounds - (BoundingVolumeBase)

matrix - (Matrix3D)



Created with the Personal Edition of HelpNDoc: Easily create Help documents