Subversion Repositories gelsvn

Rev

Rev 291 | Go to most recent revision | Details | 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
 
6
/** Interior node of bounding box tree. Contains
7
		pointers to left and right tree. */
8
template<class BoxType>
9
class BoundingINode: public BoundingNode<BoxType>
10
{
11
	BoundingNode<BoxType>* left;
12
	BoundingNode<BoxType>* right;
13
 public:
14
 
15
	BoundingINode(const BoxType& box,
16
								BoundingNode<BoxType>* _left,
17
								BoundingNode<BoxType>* _right): 
18
		BoundingNode<BoxType>(box), left(_left), right(_right) {}
19
 
20
	~BoundingINode() {delete left; delete right;}
21
 
22
	bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const; 
23
	int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
24
 
25
	const BoundingNode<BoxType>* get_left() const {return left;}
26
	const BoundingNode<BoxType>* get_right() const {return right;}
27
 
28
	void draw(int l, int lmax) const;
29
 
30
};
31
 
32
#endif