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

BSPNode is a single node in a BSPTree

Public Properties
 PropertyDefined by
  bevelPlanes : Array
[read-only]
BSPNode
  bounds : Array
[read-only] The bounding box for this node.
BSPNode
  faces : Array
[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 : Array
[read-only]
BSPNode
Public Methods
 MethodDefined by
  
BSPNode
(parent:BSPNode)
Creates a new BSPNode object.
BSPNode
  
addMesh(mesh:BSPMeshManager):void
BSPNode
  
Assigns a portal to this leaf, looking out.
BSPNode
  
assignCollider(child:Object3D, center:Number3D, radius:Number):void
BSPNode
  
assignPortal(portal:BSPPortal):void
Assigns a portal to this leaf, looking in.
BSPNode
  
processVislist(portals:Array):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:Array
_balanceWeightproperty 
arcane var _balanceWeight:Number = 1
_bevelPlanesproperty 
arcane var _bevelPlanes:Array
bevelPlanesproperty 
bevelPlanes:Array  [read-only]Implementation
    public function get bevelPlanes():Array
_boundsproperty 
arcane var _bounds:Array
boundsproperty 
bounds:Array  [read-only]

The bounding box for this node.

Implementation
    public function get bounds():Array
_buildFacesproperty 
arcane var _buildFaces:Array
_childrenproperty 
arcane var _children:Array
_collidersproperty 
arcane var _colliders:Array
_convexproperty 
arcane var _convex:Boolean
_culledproperty 
arcane var _culled:Boolean
facesproperty 
faces:Array  [read-only]Implementation
    public function get faces():Array
_hasChildrenproperty 
arcane var _hasChildren:Boolean
_isLeafproperty 
arcane var _isLeaf:Boolean
isLeafproperty 
isLeaf:Boolean  [read-only]Implementation
    public function get isLeaf():Boolean
_lastIterationPositiveproperty 
arcane var _lastIterationPositive:Boolean
leafIdproperty 
public var leafId:int = -1
leftChildproperty 
leftChild:ITreeNode  [read-only]Implementation
    public function get leftChild():ITreeNode
_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
meshproperty 
mesh:Mesh  [read-only]

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

Implementation
    public function get mesh():Mesh
_meshesproperty 
arcane var _meshes:Array
_minXproperty 
arcane var _minX:Number
_minYproperty 
arcane var _minY:Number
_minZproperty 
arcane var _minZ:Number
nameproperty 
public var name:String
_negativeNodeproperty 
arcane var _negativeNode:BSPNode
_newFacesproperty 
arcane var _newFaces:int
_ngonsproperty 
arcane var _ngons:Array
nodeIdproperty 
public var nodeId:int
_nonXZWeightproperty 
arcane var _nonXZWeight:Number = 1.5
_nonYWeightproperty 
arcane var _nonYWeight:Number = 1.2
_parentproperty 
arcane var _parent:BSPNode
parentproperty 
parent:ITreeNode  [read-only]Implementation
    public function get parent():ITreeNode
_partitionPlaneproperty 
arcane var _partitionPlane:Plane3D
partitionPlaneproperty 
partitionPlane:Plane3D  [read-only]Implementation
    public function get partitionPlane():Plane3D
_portalsproperty 
arcane var _portals:Array
_positiveNodeproperty 
arcane var _positiveNode:BSPNode
renderMarkproperty 
public var renderMark:int = -1
rightChildproperty 
rightChild:ITreeNode  [read-only]Implementation
    public function get rightChild():ITreeNode
_splitWeightproperty 
arcane var _splitWeight:Number = 10
_visListproperty 
arcane var _visList:Array
visListproperty 
visList:Array  [read-only]Implementation
    public function get visList():Array
Constructor detail
BSPNode()constructor
public function BSPNode(parent:BSPNode)Parameters
parent:BSPNode — A reference to the parent BSPNode. Pass null if this is the root node.
Init Parameters
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:Number3D, radius:Number):void Parameters
child:Object3D
 
center:Number3D
 
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):Array

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

Parameters
rootNode:BSPNode

Returns
Array
isEmpty()method 
arcane function isEmpty():Boolean

Checks if a leaf is empty

Returns
Boolean
processVislist()method 
public function processVislist(portals:Array):void

Takes a set of portals and applies the visibility information

Parameters
portals:Array
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):Array

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

Parameters
portal:BSPPortal
 
side:int

Returns
Array
Wiki link
Click to go to the wiki page for 'away3d.graphs.bsp.BSPNode'

Code examples

Comments