35 lines
984 B
C++
35 lines
984 B
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
----------------------------------------------------------------------------- */
|
|
|
|
|
|
#include "bih/bih.h"
|
|
|
|
using namespace GS::BIH;
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
Node::~Node()
|
|
{
|
|
if (p)
|
|
if (axis != Math::AxisNone)
|
|
delete [] ((Node *)p);
|
|
|
|
p = 0;
|
|
}
|
|
//------------------------------------------------------------------------------
|
|
|
|
//------------------------------------------------------------------------------
|
|
void Tree::Free()
|
|
{
|
|
root = NULL;
|
|
sarray.Free();
|
|
}
|
|
//------------------------------------------------------------------------------
|
|
|
|
//------------------------------------------------------------------------------
|
|
Tree::Tree() : min_leaf_vcount(8) {}
|
|
Tree::~Tree() { Free(); }
|
|
//------------------------------------------------------------------------------
|