| Package | sandy.view |
| Class | public class Frustum |
The frustum is volume used to control if geometrical object, such as a box, a sphere, or a point can be seen by the camera, and thus should be rendered.
Clipping of objects and polygons is performed against the frustum surfaces, as well as the near and far planes.
| Property | Defined by | ||
|---|---|---|---|
| aConstants : Array | Frustum | ||
| aNormals : Array | Frustum | ||
| aPlanes : Array | Frustum | ||
| aPoints : Array | Frustum | ||
| Method | Defined by | ||
|---|---|---|---|
|
Frustum()
Creates a frustum for the camera.
| Frustum | ||
|
Returns the culling state for the passed bounding box.
| Frustum | ||
|
clipFrontPlane(p_aCvert:Array, p_aUVCoords:Array):void
Clip the given vertex and UVCoords arrays against the frustum front plane
| Frustum | ||
|
clipFrustum(p_aCvert:Array, p_aUVCoords:Array):void
Clips a polygon against the frustum planes
| Frustum | ||
|
clipLineFrontPlane(p_aCvert:Array):void
Clip the given vertex and UVCoords arrays against the frustum front plane
| Frustum | ||
|
clipPolygon(p_oPlane:Plane, p_aCvert:Array, p_aUVCoords:Array):void
Clips a polygon against one the frustum planes
| Frustum | ||
|
computePlanes(p_nAspect:Number, p_nNear:Number, p_nFar:Number, p_nFov:Number):void
Computes the frustum planes.
| Frustum | ||
|
extractPlanes(comboMatrix:Matrix4, normalize:Boolean):void
Extracts the clipping planes.
| Frustum | ||
|
Returns the culling state for the passed point.
| Frustum | ||
|
Returns the culling state for the passed bounding sphere.
| Frustum | ||
| Constant | Defined by | ||
|---|---|---|---|
| BOTTOM : uint = 5 [static]
| Frustum | ||
| EPSILON : Number = 0.005 [static]
| Frustum | ||
| FAR : uint = 1 [static]
| Frustum | ||
| INSIDE : CullingState
[static]
| Frustum | ||
| INTERSECT : CullingState
[static]
| Frustum | ||
| LEFT : uint = 3 [static]
| Frustum | ||
| NEAR : uint = 0 [static]
| Frustum | ||
| OUTSIDE : CullingState
[static]
| Frustum | ||
| RIGHT : uint = 2 [static]
| Frustum | ||
| TOP : uint = 4 [static]
| Frustum | ||
| aConstants | property |
public var aConstants:Array
| aNormals | property |
public var aNormals:Array
| aPlanes | property |
public var aPlanes:Array
| aPoints | property |
public var aPoints:Array
| Frustum | () | constructor |
public function Frustum()Creates a frustum for the camera.
This constructor only creates the necessay data structures
| boxInFrustum | () | method |
public function boxInFrustum(box:BBox):CullingStateReturns the culling state for the passed bounding box.
The method tests if the bounding box is within the frustum volume or not.
The returned culling state is Frustum.INSIDE, Frustum.OUTSIDE or Frustum.INTERSECT
box:BBox — The box to test
|
CullingState |
| clipFrontPlane | () | method |
public function clipFrontPlane(p_aCvert:Array, p_aUVCoords:Array):voidClip the given vertex and UVCoords arrays against the frustum front plane
Parametersp_aCvert:Array |
|
p_aUVCoords:Array |
| clipFrustum | () | method |
public function clipFrustum(p_aCvert:Array, p_aUVCoords:Array):voidClips a polygon against the frustum planes
Parametersp_aCvert:Array — Vertices of the polygon
|
|
p_aUVCoords:Array — UV coordiantes of the polygon
|
| clipLineFrontPlane | () | method |
public function clipLineFrontPlane(p_aCvert:Array):voidClip the given vertex and UVCoords arrays against the frustum front plane
Parametersp_aCvert:Array |
| clipPolygon | () | method |
public function clipPolygon(p_oPlane:Plane, p_aCvert:Array, p_aUVCoords:Array):voidClips a polygon against one the frustum planes
Parametersp_oPlane:Plane — The plane to clip against
|
|
p_aCvert:Array — Vertices of the polygon
|
|
p_aUVCoords:Array — UV coordiantes of the polygon
|
| computePlanes | () | method |
public function computePlanes(p_nAspect:Number, p_nNear:Number, p_nFar:Number, p_nFov:Number):voidComputes the frustum planes.
Parametersp_nAspect:Number — Aspect ration of the camera
|
|
p_nNear:Number — The distance from the camera to the near clipping plane
|
|
p_nFar:Number — The distance from the camera to the far clipping plane
|
|
p_nFov:Number — Vertical field of view of the camera
|
| extractPlanes | () | method |
public function extractPlanes(comboMatrix:Matrix4, normalize:Boolean):voidExtracts the clipping planes.
[ToDo: Expalain this ]
ParameterscomboMatrix:Matrix4 |
|
normalize:Boolean |
| pointInFrustum | () | method |
public function pointInFrustum(p_oPoint:Vector):CullingStateReturns the culling state for the passed point.
The method tests if the passed point is within the frustum volume or not.
The returned culling state is Frustum.INSIDE or Frustum.OUTSIDE
p_oPoint:Vector — The point to test
|
CullingState |
| sphereInFrustum | () | method |
public function sphereInFrustum(p_oS:BSphere):CullingStateReturns the culling state for the passed bounding sphere.
The method tests if the bounding sphere is within the frustum volume or not.
The returned culling state is Frustum.INSIDE, Frustum.OUTSIDE or Frustum.INTERSECT
p_oS:BSphere — The sphere to test
|
CullingState |
| BOTTOM | constant |
public static const BOTTOM:uint = 5
| EPSILON | constant |
public static const EPSILON:Number = 0.005
| FAR | constant |
public static const FAR:uint = 1
| INSIDE | constant |
public static const INSIDE:CullingState
| INTERSECT | constant |
public static const INTERSECT:CullingState
| LEFT | constant |
public static const LEFT:uint = 3
| NEAR | constant |
public static const NEAR:uint = 0
| OUTSIDE | constant |
public static const OUTSIDE:CullingState
| RIGHT | constant |
public static const RIGHT:uint = 2
| TOP | constant |
public static const TOP:uint = 4