Packageaway3d.core.partition
Classpublic class ViewVolume
InheritanceViewVolume Inheritance NodeBase Inheritance Object



Public Properties
 PropertyDefined By
  depth : Number
[read-only]
ViewVolume
  height : Number
[read-only]
ViewVolume
  maxBound : Vector3D
[read-only]
ViewVolume
  maxX : Number
[read-only]
ViewVolume
  maxY : Number
[read-only]
ViewVolume
  maxZ : Number
[read-only]
ViewVolume
  minBound : Vector3D
[read-only]
ViewVolume
  minX : Number
[read-only]
ViewVolume
  minY : Number
[read-only]
ViewVolume
  minZ : Number
[read-only]
ViewVolume
  numCellsX : uint
[read-only]
ViewVolume
  numCellsY : uint
[read-only]
ViewVolume
  numCellsZ : uint
[read-only]
ViewVolume
 Inheritedparent : NodeBase
[read-only] The parent node.
NodeBase
 InheritedshowDebugBounds : Boolean
NodeBase
  width : Number
[read-only]
ViewVolume
Protected Properties
 PropertyDefined By
 Inherited_childNodes : Vector.<NodeBase>
NodeBase
 Inherited_debugPrimitive : WireframePrimitiveBase
NodeBase
 Inherited_numChildNodes : uint
NodeBase
 InheritednumEntities : int
[read-only]
NodeBase
Public Methods
 MethodDefined By
  
ViewVolume(minBound:Vector3D, maxBound:Vector3D, cellSize:Number = -1)
Creates a new ViewVolume with given dimensions.
ViewVolume
  
[override]
ViewVolume
  
addVisibleDynamicCell(cell:InvertedOctreeNode, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void
ViewVolume
  
addVisibleRegion(minBounds:Vector3D, maxBounds:Vector3D, scene:Scene3D, dynamicGrid:DynamicGrid = null, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void
Adds all static geometry in a scene that intersects a given region, as well as the dynamic grid if provided.
ViewVolume
  
addVisibleStatic(entity:Entity, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void
ViewVolume
  
addVisibleViewVolume(viewVolume:ViewVolume, scene:Scene3D, dynamicGrid:DynamicGrid = null):void
A shortcut method for addVisibleRegion, that adds static geometry in a scene that intersects a given viewvolume, as well as the dynamic grid if provided.
ViewVolume
  
contains(entryPoint:Vector3D):Boolean
ViewVolume
 Inherited
Finds the partition that contains (or should contain) the given entity.
NodeBase
 Inherited
isInFrustum(camera:Camera3D):Boolean
Tests if the current node is at least partly inside the frustum.
NodeBase
  
markCellAccessible(indexX:uint, indexY:uint, indexZ:uint):void
Enable the use of a cell.
ViewVolume
  
markCellInaccessible(indexX:uint, indexY:uint, indexZ:uint):void
Disables the use of a cell.
ViewVolume
  
removeVisibleDynamicCell(cell:InvertedOctreeNode, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void
ViewVolume
  
removeVisibleStatic(entity:Entity, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void
ViewVolume
Protected Methods
 MethodDefined By
  
[override]
ViewVolume
 Inherited
isInFrustumImpl(camera:Camera3D):Boolean
NodeBase
 Inherited
updateNumEntities(value:int):void
NodeBase
Property Detail
_activeproperty
arcane var _active:Boolean

depthproperty 
depth:Number  [read-only]


Implementation
    public function get depth():Number
heightproperty 
height:Number  [read-only]


Implementation
    public function get height():Number
maxBoundproperty 
maxBound:Vector3D  [read-only]


Implementation
    public function get maxBound():Vector3D
maxXproperty 
maxX:Number  [read-only]


Implementation
    public function get maxX():Number
maxYproperty 
maxY:Number  [read-only]


Implementation
    public function get maxY():Number
maxZproperty 
maxZ:Number  [read-only]


Implementation
    public function get maxZ():Number
minBoundproperty 
minBound:Vector3D  [read-only]


Implementation
    public function get minBound():Vector3D
minXproperty 
minX:Number  [read-only]


Implementation
    public function get minX():Number
minYproperty 
minY:Number  [read-only]


Implementation
    public function get minY():Number
minZproperty 
minZ:Number  [read-only]


Implementation
    public function get minZ():Number
numCellsXproperty 
numCellsX:uint  [read-only]


Implementation
    public function get numCellsX():uint
numCellsYproperty 
numCellsY:uint  [read-only]


Implementation
    public function get numCellsY():uint
numCellsZproperty 
numCellsZ:uint  [read-only]


Implementation
    public function get numCellsZ():uint
widthproperty 
width:Number  [read-only]


Implementation
    public function get width():Number
Constructor Detail
ViewVolume()Constructor
public function ViewVolume(minBound:Vector3D, maxBound:Vector3D, cellSize:Number = -1)

Creates a new ViewVolume with given dimensions. A ViewVolume is a region where the camera or a shadow casting light could reside in.

Parameters
minBound:Vector3D — The minimum boundaries of the view volume (the bottom-left-near corner)
 
maxBound:Vector3D — The maximum boundaries of the view volume (the top-right-far corner)
 
cellSize:Number (default = -1) — The size of cell subdivisions for the view volume. The default value is -1, meaning the view volume will not be subdivided. This is the value that should usually be used when setting visibility info manually.
Method Detail
acceptTraverser()method
override public function acceptTraverser(traverser:PartitionTraverser):void

Parameters

traverser:PartitionTraverser

addVisibleDynamicCell()method 
public function addVisibleDynamicCell(cell:InvertedOctreeNode, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void

Parameters

cell:InvertedOctreeNode
 
indexX:uint (default = 0)
 
indexY:uint (default = 0)
 
indexZ:uint (default = 0)

addVisibleRegion()method 
public function addVisibleRegion(minBounds:Vector3D, maxBounds:Vector3D, scene:Scene3D, dynamicGrid:DynamicGrid = null, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void

Adds all static geometry in a scene that intersects a given region, as well as the dynamic grid if provided.

Parameters

minBounds:Vector3D — The minimum bounds of the region to be considered visible
 
maxBounds:Vector3D — The maximum bounds of the region to be considered visible
 
scene:Scene3D — The Scene3D object containing the static objects to be added.
 
dynamicGrid:DynamicGrid (default = null) — The DynamicGrid belonging to the partition this will be used with
 
indexX:uint (default = 0) — An optional index for the cell within ViewVolume. If created with gridSize -1, this is typically avoided.
 
indexY:uint (default = 0) — An optional index for the cell within ViewVolume. If created with gridSize -1, this is typically avoided.
 
indexZ:uint (default = 0) — An optional index for the cell within ViewVolume. If created with gridSize -1, this is typically avoided.

addVisibleStatic()method 
public function addVisibleStatic(entity:Entity, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void

Parameters

entity:Entity
 
indexX:uint (default = 0)
 
indexY:uint (default = 0)
 
indexZ:uint (default = 0)

addVisibleViewVolume()method 
public function addVisibleViewVolume(viewVolume:ViewVolume, scene:Scene3D, dynamicGrid:DynamicGrid = null):void

A shortcut method for addVisibleRegion, that adds static geometry in a scene that intersects a given viewvolume, as well as the dynamic grid if provided.

Parameters

viewVolume:ViewVolume — The viewVolume providing the region
 
scene:Scene3D — The Scene3D object containing the static objects to be added.
 
dynamicGrid:DynamicGrid (default = null) — The DynamicGrid belonging to the partition this will be used with

contains()method 
public function contains(entryPoint:Vector3D):Boolean

Parameters

entryPoint:Vector3D

Returns
Boolean
createDebugBounds()method 
override protected function createDebugBounds():WireframePrimitiveBase

Returns
WireframePrimitiveBase
markCellAccessible()method 
public function markCellAccessible(indexX:uint, indexY:uint, indexZ:uint):void

Enable the use of a cell. Do this if the camera or casting light can potentially be in this cell. If the ViewVolume was constructed with gridSize -1, it does not need to be called

Parameters

indexX:uint — The x-index of the cell
 
indexY:uint — The y-index of the cell
 
indexZ:uint — The z-index of the cell

markCellInaccessible()method 
public function markCellInaccessible(indexX:uint, indexY:uint, indexZ:uint):void

Disables the use of a cell. Do this only if the camera or casting light can never be in this cell.

Parameters

indexX:uint — The x-index of the cell
 
indexY:uint — The y-index of the cell
 
indexZ:uint — The z-index of the cell

removeVisibleDynamicCell()method 
public function removeVisibleDynamicCell(cell:InvertedOctreeNode, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void

Parameters

cell:InvertedOctreeNode
 
indexX:uint (default = 0)
 
indexY:uint (default = 0)
 
indexZ:uint (default = 0)

removeVisibleStatic()method 
public function removeVisibleStatic(entity:Entity, indexX:uint = 0, indexY:uint = 0, indexZ:uint = 0):void

Parameters

entity:Entity
 
indexX:uint (default = 0)
 
indexY:uint (default = 0)
 
indexZ:uint (default = 0)