/* Computer Graphics
 *
 * Filename ........ bsp.h
 * Description ..... Functions related to Binary Space-Partitioning trees
 * Date ............ 22.11.2009
 * Created by ...... Paul Melis
 */

#ifndef BSP_H
#define BSP_H

#include "polys.h"

typedef struct BSPNode
{
    // May be NULL
    struct BSPNode *left_child, *right_child;

    // The polygon assigned to this node.
    // It defines the split plane.
    poly    polygon;
}
BSPNode;

BSPNode* BuildBSPTreeIncorrect(polys *polygons);
BSPNode* BuildBSPTree(polys *polygons);

#endif
