Subversion Repositories gelsvn

Rev

Rev 291 | Rev 309 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
290 jrf 1
#ifndef __BOUNDINGINODE_H
2
#define __BOUNDINGINODE_H
3
 
4
#include "BoundingNode.h"
5
 
291 jrf 6
namespace Geometry
7
{
8
 
290 jrf 9
/** Interior node of bounding box tree. Contains
10
		pointers to left and right tree. */
11
template<class BoxType>
12
class BoundingINode: public BoundingNode<BoxType>
13
{
14
	BoundingNode<BoxType>* left;
15
	BoundingNode<BoxType>* right;
16
 public:
17
 
18
	BoundingINode(const BoxType& box,
19
								BoundingNode<BoxType>* _left,
20
								BoundingNode<BoxType>* _right): 
21
		BoundingNode<BoxType>(box), left(_left), right(_right) {}
22
 
23
	~BoundingINode() {delete left; delete right;}
24
 
25
	bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const; 
26
	int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
27
 
28
	const BoundingNode<BoxType>* get_left() const {return left;}
29
	const BoundingNode<BoxType>* get_right() const {return right;}
30
};
31
 
291 jrf 32
}
290 jrf 33
#endif