cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh
Class BSPNode

Package class diagram package BSPNode
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.BSPNode
All Implemented Interfaces:
Serializable

public class BSPNode
extends Object
implements Serializable

Author:
Jakub Node of BSP tree structure built for NavMesh
See Also:
Serialized Form

Field Summary
 BSPNode left
           
 NavMesh navmesh
           
 BSPNode parent
           
 ArrayList polys
           
 BSPNode right
           
 math.geom2d.line.StraightLine2D sepLine
           
 
Constructor Summary
BSPNode(NavMesh m, BSPNode par)
           
 
Method Summary
 void build()
          Recursive method building an antrige tree from this node as root
 math.geom2d.line.StraightLine2D findSeparatingLine()
           
 boolean isLeaf()
           
 boolean shouldSplit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

navmesh

public transient NavMesh navmesh

polys

public ArrayList polys

parent

public BSPNode parent

sepLine

public math.geom2d.line.StraightLine2D sepLine

left

public BSPNode left

right

public BSPNode right
Constructor Detail

BSPNode

public BSPNode(NavMesh m,
               BSPNode par)
Parameters:
m -
par - Cretaes a new node pointing to parent par with navmesh m. Remember to fill polys propery. Then build method should be called.
Method Detail

shouldSplit

public boolean shouldSplit()

findSeparatingLine

public math.geom2d.line.StraightLine2D findSeparatingLine()
                                                   throws Exception
Throws:
Exception

build

public void build()
Recursive method building an antrige tree from this node as root


isLeaf

public boolean isLeaf()


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.