Packageaway3d.graphs.bsp
Classpublic final class BSPNode
InheritanceBSPNode Inheritance flash.events.EventDispatcher
Implements ITreeNode

BSPNode is a single node in a BSPTree



Public Properties
 PropertyDefined By
  bevelPlanes : Vector.<Plane3D>
[read-only]
BSPNode
  bounds : Array
[read-only] The bounding box for this node.
BSPNode
  faces : Vector.<Face>
[read-only]
BSPNode
  isLeaf : Boolean
[read-only]
BSPNode
  leafId : int = -1
BSPNode
  leftChild : ITreeNode
[read-only]
BSPNode
  mesh : Mesh
[read-only] The mesh contained within if the current node is a leaf, otherwise null
BSPNode
  name : String
BSPNode
  nodeId : int
BSPNode
  parent : ITreeNode
[read-only]
BSPNode
  partitionPlane : Plane3D
[read-only]
BSPNode
  renderMark : int = -1
BSPNode
  rightChild : ITreeNode
[read-only]
BSPNode
  visList : Vector.<int>
[read-only]
BSPNode
Public Methods
 MethodDefined By
  
Creates a new BSPNode object.
BSPNode
  
addMesh(mesh:BSPMeshManager):void
BSPNode
  
Assigns a portal to this leaf, looking out.
BSPNode
  
assignCollider(child:Object3D, center:Vector3D, radius:Number):void
BSPNode
  
assignPortal(portal:BSPPortal):void
Assigns a portal to this leaf, looking in.
BSPNode
  
processVislist(portals:Vector.<BSPPortal>):void
Takes a set of portals and applies the visibility information
BSPNode
  
removeMesh(mesh:BSPMeshManager):void
BSPNode
Property Detail
_assignedFacesproperty
arcane var _assignedFaces:int

_backPortalsproperty 
arcane var _backPortals:Vector.<BSPPortal>

_balanceWeightproperty 
arcane var _balanceWeight:Number = 1

_bevelPlanesproperty 
arcane var _bevelPlanes:Vector.<Plane3D>

_boundsproperty 
arcane var _bounds:Array

_buildFacesproperty 
arcane var _buildFaces:Vector.<NGon>

_childrenproperty 
arcane var _children:Array

_collidersproperty 
arcane var _colliders:Array

_convexproperty 
arcane var _convex:Boolean

_culledproperty 
arcane var _culled:Boolean

_hasChildrenproperty 
arcane var _hasChildren:Boolean

_isLeafproperty 
arcane var _isLeaf:Boolean

_lastIterationPositiveproperty 
arcane var _lastIterationPositive:Boolean

_maxTimeOutproperty 
arcane var _maxTimeOut:int = 500

_maxXproperty 
arcane var _maxX:Number

_maxYproperty 
arcane var _maxY:Number

_maxZproperty 
arcane var _maxZ:Number

_meshproperty 
arcane var _mesh:Mesh

_meshesproperty 
arcane var _meshes:Array

_minXproperty 
arcane var _minX:Number

_minYproperty 
arcane var _minY:Number

_minZproperty 
arcane var _minZ:Number

_negativeNodeproperty 
arcane var _negativeNode:BSPNode

_newFacesproperty 
arcane var _newFaces:int

_ngonsproperty 
arcane var _ngons:Vector.<NGon>

_nonXZWeightproperty 
arcane var _nonXZWeight:Number = 1.5

_nonYWeightproperty 
arcane var _nonYWeight:Number = 1.2

_parentproperty 
arcane var _parent:BSPNode

_partitionPlaneproperty 
arcane var _partitionPlane:Plane3D

_portalsproperty 
arcane var _portals:Vector.<BSPPortal>

_positiveNodeproperty 
arcane var _positiveNode:BSPNode

_splitWeightproperty 
arcane var _splitWeight:Number = 10

_visListproperty 
arcane var _visList:Vector.<int>

bevelPlanesproperty 
bevelPlanes:Vector.<Plane3D>  [read-only]


Implementation
    public function get bevelPlanes():Vector.<Plane3D>
boundsproperty 
bounds:Array  [read-only]

The bounding box for this node.


Implementation
    public function get bounds():Array
facesproperty 
faces:Vector.<Face>  [read-only]


Implementation
    public function get faces():Vector.<Face>
isLeafproperty 
isLeaf:Boolean  [read-only]


Implementation
    public function get isLeaf():Boolean
leafIdproperty 
public var leafId:int = -1

leftChildproperty 
leftChild:ITreeNode  [read-only]


Implementation
    public function get leftChild():ITreeNode
meshproperty 
mesh:Mesh  [read-only]

The mesh contained within if the current node is a leaf, otherwise null


Implementation
    public function get mesh():Mesh
nameproperty 
public var name:String

nodeIdproperty 
public var nodeId:int

parentproperty 
parent:ITreeNode  [read-only]


Implementation
    public function get parent():ITreeNode
partitionPlaneproperty 
partitionPlane:Plane3D  [read-only]


Implementation
    public function get partitionPlane():Plane3D
renderMarkproperty 
public var renderMark:int = -1

rightChildproperty 
rightChild:ITreeNode  [read-only]


Implementation
    public function get rightChild():ITreeNode
visListproperty 
visList:Vector.<int>  [read-only]


Implementation
    public function get visList():Vector.<int>
Constructor Detail
BSPNode()Constructor
public function BSPNode(parent:BSPNode)

Creates a new BSPNode object.

Parameters
parent:BSPNode — A reference to the parent BSPNode. Pass null if this is the root node.
####INIT####
Method Detail
addFace()method
arcane function addFace(face:Face):void

Parameters

face:Face

addMesh()method 
public function addMesh(mesh:BSPMeshManager):void

Parameters

mesh:BSPMeshManager

assignBackPortal()method 
public function assignBackPortal(portal:BSPPortal):void

Assigns a portal to this leaf, looking out.

Parameters

portal:BSPPortal

assignCollider()method 
public function assignCollider(child:Object3D, center:Vector3D, radius:Number):void

Parameters

child:Object3D
 
center:Vector3D
 
radius:Number

assignPortal()method 
public function assignPortal(portal:BSPPortal):void

Assigns a portal to this leaf, looking in.

Parameters

portal:BSPPortal

generatePortals()method 
arcane function generatePortals(rootNode:BSPNode):Vector.<BSPPortal>

Creates portals on this node's partition plane, connecting linking leaves on either side.

Parameters

rootNode:BSPNode

Returns
Vector.<BSPPortal>
isEmpty()method 
arcane function isEmpty():Boolean

Checks if a leaf is empty

Returns
Boolean
processVislist()method 
public function processVislist(portals:Vector.<BSPPortal>):void

Takes a set of portals and applies the visibility information

Parameters

portals:Vector.<BSPPortal>

removeFace()method 
arcane function removeFace(face:Face):void

Parameters

face:Face

removeMesh()method 
public function removeMesh(mesh:BSPMeshManager):void

Parameters

mesh:BSPMeshManager

splitPortalByChildren()method 
arcane function splitPortalByChildren(portal:BSPPortal, side:int):Vector.<BSPPortal>

Splits a portal by this node's children, creating portals between leaves.

Parameters

portal:BSPPortal
 
side:int

Returns
Vector.<BSPPortal>