Packageorg.papervision3d.core.render.data
Classpublic final class QuadTreeNode

Quadrant tree node



Public Properties
 PropertyDefined by
  center : Array
Array of primitives that lie in the center of the quadrant.
QuadTreeNode
  create : Function
Placeholder function for creating new quadrant node from a cache of objects.
QuadTreeNode
  hasContent : Boolean = false
Says if node has content or not
QuadTreeNode
  leftbottom : QuadTreeNode
The quadrant tree node for the bottom left quadrant.
QuadTreeNode
  leftbottomFlag : Boolean
Determines if the bounds of the bottom left quadrant need re-calculating.
QuadTreeNode
  lefttop : QuadTreeNode
The quadrant tree node for the top left quadrant.
QuadTreeNode
  lefttopFlag : Boolean
Determines if the bounds of the top left quadrant need re-calculating.
QuadTreeNode
  maxlevel : int = 4
QuadTreeNode
  onlysource : DisplayObject3D
hold the 3d object referenced when onlysourceFlag is true.
QuadTreeNode
  onlysourceFlag : Boolean = true
Determines if the quadrant node contains only one source.
QuadTreeNode
  parent : QuadTreeNode
The quadrant parent.
QuadTreeNode
  rightbottom : QuadTreeNode
The quadrant tree node for the bottom right quadrant.
QuadTreeNode
  rightbottomFlag : Boolean
Determines if the bounds of the bottom right quadrant need re-calculating.
QuadTreeNode
  righttop : QuadTreeNode
The quadrant tree node for the top right quadrant.
QuadTreeNode
  righttopFlag : Boolean
Determines if the bounds of the top right quadrant need re-calculating.
QuadTreeNode
  xdiv : Number
The x coordinate of the quadrant division.
QuadTreeNode
  ydiv : Number
The x coordinate of the quadrant division.
QuadTreeNode
Public Methods
 MethodDefined by
  
QuadTreeNode(xdiv:Number, ydiv:Number, width:Number, height:Number, level:int, parent:QuadTreeNode = null, maxLevel:uint = 4)
Creates a new PrimitiveQuadrantTreeNode object.
QuadTreeNode
  
getRect():Rectangle
QuadTreeNode
  
Adds a primitive to the quadrant
QuadTreeNode
  
render(limit:Number, renderSessionData:RenderSessionData, graphics:Graphics):void
Sorts and renders the contents of the quadrant tree
QuadTreeNode
  
reset(xdiv:Number, ydiv:Number, width:Number, height:Number, maxLevel:uint):void
Clears the quadrant of all primitives and child nodes
QuadTreeNode
Property detail
centerproperty
public var center:Array

Array of primitives that lie in the center of the quadrant.

createproperty 
public var create:Function

Placeholder function for creating new quadrant node from a cache of objects. Saves recreating objects and GC problems.

hasContentproperty 
public var hasContent:Boolean = false

Says if node has content or not

leftbottomproperty 
public var leftbottom:QuadTreeNode

The quadrant tree node for the bottom left quadrant.

leftbottomFlagproperty 
public var leftbottomFlag:Boolean

Determines if the bounds of the bottom left quadrant need re-calculating.

lefttopproperty 
public var lefttop:QuadTreeNode

The quadrant tree node for the top left quadrant.

lefttopFlagproperty 
public var lefttopFlag:Boolean

Determines if the bounds of the top left quadrant need re-calculating.

maxlevelproperty 
public var maxlevel:int = 4
onlysourceproperty 
public var onlysource:DisplayObject3D

hold the 3d object referenced when onlysourceFlag is true.

onlysourceFlagproperty 
public var onlysourceFlag:Boolean = true

Determines if the quadrant node contains only one source.

parentproperty 
public var parent:QuadTreeNode

The quadrant parent.

rightbottomproperty 
public var rightbottom:QuadTreeNode

The quadrant tree node for the bottom right quadrant.

rightbottomFlagproperty 
public var rightbottomFlag:Boolean

Determines if the bounds of the bottom right quadrant need re-calculating.

righttopproperty 
public var righttop:QuadTreeNode

The quadrant tree node for the top right quadrant.

righttopFlagproperty 
public var righttopFlag:Boolean

Determines if the bounds of the top right quadrant need re-calculating.

xdivproperty 
public var xdiv:Number

The x coordinate of the quadrant division.

ydivproperty 
public var ydiv:Number

The x coordinate of the quadrant division.

Constructor detail
QuadTreeNode()constructor
public function QuadTreeNode(xdiv:Number, ydiv:Number, width:Number, height:Number, level:int, parent:QuadTreeNode = null, maxLevel:uint = 4)

Creates a new PrimitiveQuadrantTreeNode object.

Parameters
xdiv:Number — The x coordinate for the division between left and right child quadrants.
 
ydiv:Number — The y coordinate for the division between top and bottom child quadrants.
 
width:Number — The width of the quadrant node.
 
height:Number — The height of the quadrant node.
 
level:int — The iteration number of the quadrant node.
 
parent:QuadTreeNode (default = null) — The parent quadrant of the quadrant node.
 
maxLevel:uint (default = 4) — The deepest a Node can go
Method detail
getRect()method
public function getRect():Rectangle

Returns
Rectangle
push()method 
public function push(pri:RenderableListItem):void

Adds a primitive to the quadrant

Parameters
pri:RenderableListItem
render()method 
public function render(limit:Number, renderSessionData:RenderSessionData, graphics:Graphics):void

Sorts and renders the contents of the quadrant tree

Parameters
limit:Number
 
renderSessionData:RenderSessionData
 
graphics:Graphics
reset()method 
public function reset(xdiv:Number, ydiv:Number, width:Number, height:Number, maxLevel:uint):void

Clears the quadrant of all primitives and child nodes

Parameters
xdiv:Number
 
ydiv:Number
 
width:Number
 
height:Number
 
maxLevel:uint