Functions | Variables

kd-tree.cpp File Reference

#include <iostream>
#include <fstream>
#include "glut/frustum.h"
#include "glut-demo/glut-demo.h"
#include "kdtree/kdtree.h"
#include "nstream/nstream.h"
#include "perf/perf.h"
#include "util/file.h"
Include dependency graph for kd-tree.cpp:

Go to the source code of this file.

Functions

static float getRandom (float M) throw ()
static float getRandom2 (float M) throw ()
static void getRandomRect (const rect3d_t &base, float size, rect3d_t &r) throw ()
static void drawRect (const rect3d_t &r) throw ()
static void displayNode (const kdtree::Node *node, int level) throw ()
static void walkFrontToBack (const kdtree::Node *node, const frustum_t &frustum, const point3d_t &start, int &level) throw ()
int main (int argc, const char *argv[])

Variables

static const float s_max = 250.0
static int s_displayLevel = 0
static int s_displayWalk = 0
static int s_maxWalkLevel = 10
static float s_angle = 0.0
static const float s_degreesPerRadian = 180.0 / M_PI
static const float s_deltaA = 5.0 / s_degreesPerRadian
static float s_zAngle = 0.0
static const float s_maxZAngle = 0.5 * M_PI

Function Documentation

static float getRandom ( float  M  )  throw () [static]

Definition at line 94 of file kd-tree.cpp.

static float getRandom2 ( float  M  )  throw () [static]

Definition at line 106 of file kd-tree.cpp.

static void getRandomRect ( const rect3d_t base,
float  size,
rect3d_t r 
) throw () [static]

Definition at line 119 of file kd-tree.cpp.

static void drawRect ( const rect3d_t r  )  throw () [static]

Definition at line 139 of file kd-tree.cpp.

static void displayNode ( const kdtree::Node node,
int  level 
) throw () [static]

Definition at line 158 of file kd-tree.cpp.

static void walkFrontToBack ( const kdtree::Node node,
const frustum_t frustum,
const point3d_t start,
int &  level 
) throw () [static]

Definition at line 198 of file kd-tree.cpp.

int main ( int  argc,
const char *  argv[] 
)

Definition at line 426 of file kd-tree.cpp.


Variable Documentation

const float s_max = 250.0 [static]

Definition at line 23 of file kd-tree.cpp.

int s_displayLevel = 0 [static]

Definition at line 25 of file kd-tree.cpp.

int s_displayWalk = 0 [static]

Definition at line 27 of file kd-tree.cpp.

int s_maxWalkLevel = 10 [static]

Definition at line 28 of file kd-tree.cpp.

float s_angle = 0.0 [static]

Definition at line 30 of file kd-tree.cpp.

const float s_degreesPerRadian = 180.0 / M_PI [static]

Definition at line 31 of file kd-tree.cpp.

const float s_deltaA = 5.0 / s_degreesPerRadian [static]

Definition at line 32 of file kd-tree.cpp.

float s_zAngle = 0.0 [static]

Definition at line 34 of file kd-tree.cpp.

const float s_maxZAngle = 0.5 * M_PI [static]

Definition at line 35 of file kd-tree.cpp.