Subversion Repositories gelsvn

Rev

Rev 307 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 307 Rev 308
Line 2... Line 2...
2
#define __BOUNDINGTREE_H
2
#define __BOUNDINGTREE_H
3
 
3
 
4
#include "BoundingNode.h"
4
#include "BoundingNode.h"
5
#include "BoundingLNode.h"
5
#include "BoundingLNode.h"
6
#include "BoundingINode.h"
6
#include "BoundingINode.h"
-
 
7
#include "Ray.h"
7
 
8
 
8
namespace Geometry
9
namespace Geometry
9
{
10
{
10
 
11
 
11
template<class BoxType>
12
template<class BoxType>
Line 24... Line 25...
24
	BoundingTree(): root(0) {}
25
	BoundingTree(): root(0) {}
25
 
26
 
26
	~BoundingTree() {delete root;}
27
	~BoundingTree() {delete root;}
27
 
28
 
28
	void build(std::vector<Triangle>& triangles);
29
	void build(std::vector<Triangle>& triangles);
-
 
30
 
29
	bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const;
31
	bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const;
-
 
32
 
-
 
33
	void intersect(Ray& r) const;
-
 
34
 
30
	int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
35
	int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
31
 
36
 
32
	float compute_signed_distance(const CGLA::Vec3f& p,	float=FLT_MAX) const;
37
	float compute_signed_distance(const CGLA::Vec3f& p,	float=FLT_MAX) const;
33
};
38
};
34
 
39