| Package | sandy.view |
| Class | public class Frustum |
The frustum is volume used to control a 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
An array of planes representing the frustum.
| Frustum | ||
| aPoints : Array
An array of points representing the frustum.
| 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
Clips a polygon against the front frustum 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]
Specifies the index of the bottom plane of the frustum in the aPlanes array.
| Frustum | ||
| EPSILON : Number = 0.005 [static]
| Frustum | ||
| FAR : uint = 0 [static]
Specifies the index of the far plane of the frustum in the aPlanes array.
| Frustum | ||
| INSIDE : CullingState
[static]
Alias of CullingState.INSIDE.
| Frustum | ||
| INTERSECT : CullingState
[static]
Alias of CullingState.INTERSECT.
| Frustum | ||
| LEFT : uint = 3 [static]
Specifies the index of the left plane of the frustum in the aPlanes array.
| Frustum | ||
| NEAR : uint = 1 [static]
Specifies the index of the near plane of the frustum in the aPlanes array.
| Frustum | ||
| OUTSIDE : CullingState
[static]
Alias of CullingState.OUTSIDE.
| Frustum | ||
| RIGHT : uint = 2 [static]
Specifies the index of the right plane of the frustum in the aPlanes array.
| Frustum | ||
| TOP : uint = 4 [static]
Specifies the index of the top plane of the frustum in the aPlanes array.
| Frustum | ||
| aConstants | property |
public var aConstants:Array
| aNormals | property |
public var aNormals:Array
| aPlanes | property |
public var aPlanes:ArrayAn array of planes representing the frustum.
| aPoints | property |
public var aPoints:ArrayAn array of points representing the frustum.
| 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 either Frustum.INSIDE, Frustum.OUTSIDE or Frustum.INTERSECT
Parametersbox:BBox — The box to test.
|
CullingState —
The culling state of the box.
|
| clipFrontPlane | () | method |
public function clipFrontPlane(p_aCvert:Array, p_aUVCoords:Array):voidClips a polygon against the front frustum plane.
Parametersp_aCvert:Array — Vertices of the polygon.
|
|
p_aUVCoords:Array — UV coordiantes of the polygon.
|
| 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 — Vertices of the line.
|
| 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 either Frustum.INSIDE or Frustum.OUTSIDE.
Parametersp_oPoint:Vector — The point to test.
|
CullingState —
The culling state of the point.
|
| 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 either Frustum.INSIDE, Frustum.OUTSIDE or Frustum.INTERSECT
Parametersp_oS:BSphere — The sphere to test.
|
CullingState —
The culling state of the sphere.
|
| BOTTOM | constant |
public static const BOTTOM:uint = 5Specifies the index of the bottom plane of the frustum in the aPlanes array.
| EPSILON | constant |
public static const EPSILON:Number = 0.005
| FAR | constant |
public static const FAR:uint = 0Specifies the index of the far plane of the frustum in the aPlanes array.
| INSIDE | constant |
public static const INSIDE:CullingStateAlias of CullingState.INSIDE.
| INTERSECT | constant |
public static const INTERSECT:CullingStateAlias of CullingState.INTERSECT.
| LEFT | constant |
public static const LEFT:uint = 3Specifies the index of the left plane of the frustum in the aPlanes array.
| NEAR | constant |
public static const NEAR:uint = 1Specifies the index of the near plane of the frustum in the aPlanes array.
| OUTSIDE | constant |
public static const OUTSIDE:CullingStateAlias of CullingState.OUTSIDE.
| RIGHT | constant |
public static const RIGHT:uint = 2Specifies the index of the right plane of the frustum in the aPlanes array.
| TOP | constant |
public static const TOP:uint = 4Specifies the index of the top plane of the frustum in the aPlanes array.