Packageaway3d.core.draw
Classpublic final class PrimitiveQuadrantTreeNode

Quadrant tree node

Public Properties
 PropertyDefined by
  center : Array
Array of primitives that lie in the center of the quadrant.
PrimitiveQuadrantTreeNode
  create : Function
Placeholder function for creating new quadrant node from a cache of objects.
PrimitiveQuadrantTreeNode
  leftbottom : PrimitiveQuadrantTreeNode
The quadrant tree node for the bottom left quadrant.
PrimitiveQuadrantTreeNode
  leftbottomFlag : Boolean
Determines if the bounds of the bottom left quadrant need re-calculating.
PrimitiveQuadrantTreeNode
  lefttop : PrimitiveQuadrantTreeNode
The quadrant tree node for the top left quadrant.
PrimitiveQuadrantTreeNode
  lefttopFlag : Boolean
Determines if the bounds of the top left quadrant need re-calculating.
PrimitiveQuadrantTreeNode
  onlysource : Object3D
hold the 3d object referenced when onlysourceFlag is true.
PrimitiveQuadrantTreeNode
  onlysourceFlag : Boolean = true
Determines if the quadrant node contains only one source.
PrimitiveQuadrantTreeNode
  parent : PrimitiveQuadrantTreeNode
The quadrant parent.
PrimitiveQuadrantTreeNode
  rightbottom : PrimitiveQuadrantTreeNode
The quadrant tree node for the bottom right quadrant.
PrimitiveQuadrantTreeNode
  rightbottomFlag : Boolean
Determines if the bounds of the bottom right quadrant need re-calculating.
PrimitiveQuadrantTreeNode
  righttop : PrimitiveQuadrantTreeNode
The quadrant tree node for the top right quadrant.
PrimitiveQuadrantTreeNode
  righttopFlag : Boolean
Determines if the bounds of the top right quadrant need re-calculating.
PrimitiveQuadrantTreeNode
  xdiv : Number
The x coordinate of the quadrant division.
PrimitiveQuadrantTreeNode
  ydiv : Number
The x coordinate of the quadrant division.
PrimitiveQuadrantTreeNode
Public Methods
 MethodDefined by
  
PrimitiveQuadrantTreeNode
(xdiv:Number, ydiv:Number, width:Number, height:Number, level:int, parent:PrimitiveQuadrantTreeNode = null)
Creates a new PrimitiveQuadrantTreeNode object.
PrimitiveQuadrantTreeNode
  
push(pri:DrawPrimitive):void
Adds a primitive to the quadrant
PrimitiveQuadrantTreeNode
  
render(limit:Number):void
Sorts and renders the contents of the quadrant tree
PrimitiveQuadrantTreeNode
  
reset(xdiv:Number, ydiv:Number, width:Number, height:Number):void
Clears the quadrant of all primitives and child nodes
PrimitiveQuadrantTreeNode
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.

leftbottomproperty 
public var leftbottom:PrimitiveQuadrantTreeNode

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:PrimitiveQuadrantTreeNode

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.

onlysourceproperty 
public var onlysource:Object3D

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:PrimitiveQuadrantTreeNode

The quadrant parent.

rightbottomproperty 
public var rightbottom:PrimitiveQuadrantTreeNode

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:PrimitiveQuadrantTreeNode

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
PrimitiveQuadrantTreeNode()constructor
public function PrimitiveQuadrantTreeNode(xdiv:Number, ydiv:Number, width:Number, height:Number, level:int, parent:PrimitiveQuadrantTreeNode = null)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:PrimitiveQuadrantTreeNode (default = null) — The parent quadrant of the quadrant node.
Init Parameters
Method detail
push()method
public function push(pri:DrawPrimitive):void

Adds a primitive to the quadrant

Parameters
pri:DrawPrimitive
render()method 
public function render(limit:Number):void

Sorts and renders the contents of the quadrant tree

Parameters
limit:Number
reset()method 
public function reset(xdiv:Number, ydiv:Number, width:Number, height:Number):void

Clears the quadrant of all primitives and child nodes

Parameters
xdiv:Number
 
ydiv:Number
 
width:Number
 
height:Number
Wiki link
Click to go to the wiki page for 'away3d.core.draw.PrimitiveQuadrantTreeNode'

Code examples

Comments