public void buildTree(List<Triangle> list,Box bbox){
  long time=System.currentTimeMillis();
  if (mRootNode != null) {
    mRootNode=null;
  }
  mRootNode=new Node();
  mBoundingBox=new Box(bbox);
  mRootNode.triangles=list;
  mRootNode.boundingBox=bbox;
  mTriCount=list.size();
  buildTree(mRootNode,Axis.X_AXIS,0);
  mRootNode.processNode(mRootNode.ropes=new Node[6]);
  mRootNode.optimizeRopes();
  statistics(time);
}

public void buildTree ( List < Triangle > list , Box bbox ) { long time = System . currentTimeMillis ( ) ; if ( mRootNode != null ) { mRootNode = null ; } mRootNode = new Node ( ) ; mBoundingBox = new Box ( bbox ) ; mRootNode . triangles = list ; mRootNode . boundingBox = bbox ; mTriCount = list . size ( ) ; buildTree ( mRootNode , Axis . X_AXIS , 0 ) ; mRootNode . processNode ( mRootNode . ropes = new Node [ 6 ] ) ; mRootNode . optimizeRopes ( ) ; statistics ( time ) ; }
build the kd - tree from the given triangle list .
