A culling volume defined by planes.
For plane masks (as used in CullingVolume#computeVisibilityWithPlaneMask
), this special value represents the case where the object bounding volume is entirely outside the culling volume.
For plane masks (as used in CullingVolume.computeVisibilityWithPlaneMask
), this value represents the case where the object bounding volume is entirely inside the culling volume.
For plane masks (as used inCullingVolume.computeVisibilityWithPlaneMask
), this value represents the case where the object bounding volume (may) intersect all planes of the culling volume.
planes
=[]
An array of clipping planes.Each plane is represented by a Cartesian4 object, where the x, y, and z components define the unit vector normal to the plane, and the w component is the distance of the plane from the origin.
Constructs a culling volume from a bounding sphere. Creates six planes that create a box containing the sphere. The planes are aligned to the x, y, and z axes in world coordinates.
boundingSphere
The bounding sphere used to create the culling volume.Determines whether a bounding volume intersects the culling volume.
boundingVolume
The bounding volume whose intersection with the culling volume is to be tested.Returns
INTERSECTION.OUTSIDE
, INTERSECTION.INTERSECTING
, or INTERSECTION.INSIDE
.Determines whether a bounding volume intersects the culling volume.
boundingVolume
The bounding volume whose intersection with the culling volume is to be tested.parentPlaneMask
A bit mask from the boundingVolume's parent's check against the same culling volume, such that if planeMask & (1 << planeIndex) === 0
, for k < 31
, then the parent (and therefore this) volume is completely inside plane[planeIndex]
and that plane check can be skipped.Returns
This class was ported from Cesium under the Apache 2 License.