/*********************************************************************//**
*		Definice objektu BSPNode
*	Tento objekt je list BSP stromu. U nej je treba znat bounding box,
*	bounding box obalujici vsechny objekty, ktere obsahuji listy stromu,
*	takze samozrejme jsou potreba i cisla potomku tohoto uzlu a delici
*	roviny.
*                                                                        
*
*	author: Michal Jirous
*	date: 4.2.2009
*	file: level_face.cpp
**********************************************************************/  

#include "level_structs.h"

/** @param node Vstupni data. */
void BSPNode::create( const dnode_t &node )
{
	planenum = node.planenum;
	children[0] = node.children[0];
	children[1] = node.children[1];
	bounds.m_fBounds[0] = (float)node.mins[0];
	bounds.m_fBounds[1] = (float)node.mins[1];
	bounds.m_fBounds[2] = (float)node.mins[2];
	bounds.m_fBounds[3] = (float)node.maxs[0];
	bounds.m_fBounds[4] = (float)node.maxs[1];
	bounds.m_fBounds[5] = (float)node.maxs[2];

	firstface = node.firstface;
	numfaces = node.numfaces;
}

