Packageorg.papervision3d.core.culling
Classpublic class FrustumCuller
ImplementsIObjectCuller



Public Properties
 PropertyDefined by
  far : Number
FrustumCuller
  fov : Number
FrustumCuller
  near : Number
FrustumCuller
  ratio : Number
FrustumCuller
  transform : Matrix3D
FrustumCuller
Public Methods
 MethodDefined by
  
Constructor.
FrustumCuller
  
aabbInFrustum(object:DisplayObject3D, aabb:AxisAlignedBoundingBox, earlyOut:Boolean = true):int
Tests whether an axis aligned boundingbox is inside, outside or intersecting the frustum.
FrustumCuller
  
initialize(fovY:Number = 60, ratio:Number = 1.333, near:Number = 1, far:Number = 5000):void
Intializes the frustum.
FrustumCuller
  
pointInFrustum(x:Number, y:Number, z:Number):int
Tests whether a point is inside the frustum.
FrustumCuller
  
Tests whether a sphere is inside the frustum.
FrustumCuller
  
Tests whether an object is inside the frustum.
FrustumCuller
Public Constants
 ConstantDefined by
  INSIDE : int = 1
[static]
FrustumCuller
  INTERSECT : int = 0
[static]
FrustumCuller
  OUTSIDE : int = -1
[static]
FrustumCuller
Property detail
farproperty
far:Number  [read-write]Implementation
    public function get far():Number
    public function set far(value:Number):void
fovproperty 
fov:Number  [read-write]Implementation
    public function get fov():Number
    public function set fov(value:Number):void
nearproperty 
near:Number  [read-write]Implementation
    public function get near():Number
    public function set near(value:Number):void
ratioproperty 
ratio:Number  [read-write]Implementation
    public function get ratio():Number
    public function set ratio(value:Number):void
transformproperty 
public var transform:Matrix3D

Constructor detail
FrustumCuller()constructor
public function FrustumCuller()

Constructor.

Method detail
aabbInFrustum()method
public function aabbInFrustum(object:DisplayObject3D, aabb:AxisAlignedBoundingBox, earlyOut:Boolean = true):int

Tests whether an axis aligned boundingbox is inside, outside or intersecting the frustum. When earlyOut is set to true, the method returns INSIDE when a single point of the aabb is inside the frustum (fast). Set earlyOut to false if you want to test for INTERSECT.

Parameters
object:DisplayObject3D — The object to test.
 
aabb:AxisAlignedBoundingBox — AxisAlignedBoundingBox.
 
earlyOut:Boolean (default = true) — Early out. Default is true.

Returns
int — Integer indicating inside(1), outside(-1) or intersecting(0) the frustum.
initialize()method 
public function initialize(fovY:Number = 60, ratio:Number = 1.333, near:Number = 1, far:Number = 5000):void

Intializes the frustum.

Parameters
fovY:Number (default = 60) — Vertical Field Of View in degrees.
 
ratio:Number (default = 1.333) — Aspect ratio (ie: viewport.width / viewport.height).
 
near:Number (default = 1) — Distance to near plane (ie: camera.focus).
 
far:Number (default = 5000) — Distance to far plane.
pointInFrustum()method 
public function pointInFrustum(x:Number, y:Number, z:Number):int

Tests whether a point is inside the frustum.

Parameters
x:Number — x
 
y:Number — y
 
z:Number — z

Returns
int — Integer indicating inside (1) or outside (-1) the frustum.
sphereInFrustum()method 
public function sphereInFrustum(obj:DisplayObject3D, boundingSphere:BoundingSphere):int

Tests whether a sphere is inside the frustum.

Parameters
obj:DisplayObject3D — object The object to test.
 
boundingSphere:BoundingSphere — The bounding sphere.

Returns
int — Integer indicating inside (1), outside (0) or intersecting (-1) the frustum.
testObject()method 
public function testObject(obj:DisplayObject3D):int

Tests whether an object is inside the frustum.

Parameters
obj:DisplayObject3D — The object to test

Returns
int — Integer indicating inside(1), outside(-1) or intersecting(0)
Constant detail
INSIDEconstant
public static const INSIDE:int = 1
INTERSECTconstant 
public static const INTERSECT:int = 0
OUTSIDEconstant 
public static const OUTSIDE:int = -1