Subversion Repositories gelsvn

Rev

Rev 290 | Rev 299 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 290 Rev 291
Line 4... Line 4...
4
#include <iostream>
4
#include <iostream>
5
#include <vector>
5
#include <vector>
6
#include "Triangle.h"
6
#include "Triangle.h"
7
#include "AABox.h"
7
#include "AABox.h"
8
 
8
 
-
 
9
namespace Geometry
-
 
10
{
-
 
11
 
9
class OBox
12
class OBox
10
{
13
{
11
	const CGLA::Mat3x3f R;
14
	const CGLA::Mat3x3f R;
12
	const AABox aabox;
15
	const AABox aabox;
13
 
16
 
Line 17... Line 20...
17
	OBox(const CGLA::Mat3x3f& _R, const AABox& _aabox):
20
	OBox(const CGLA::Mat3x3f& _R, const AABox& _aabox):
18
		R(_R), aabox(_aabox) {}
21
		R(_R), aabox(_aabox) {}
19
 
22
 
20
	bool intersect(const CGLA::Vec3f&, const CGLA::Vec3f&) const;
23
	bool intersect(const CGLA::Vec3f&, const CGLA::Vec3f&) const;
21
 
24
 
22
	void gl_draw() const;
-
 
23
 
-
 
24
	void minmax_sq_dist(const CGLA::Vec3f& p, float& dmin, float& dmax) const;
25
	void minmax_sq_dist(const CGLA::Vec3f& p, float& dmin, float& dmax) const;
25
 
26
 
26
	static OBox box_triangle(const Triangle&);
27
	static OBox box_triangle(const Triangle&);
27
 
28
 
28
	static OBox box_and_split(const std::vector<Triangle>& invec,
29
	static OBox box_and_split(const std::vector<Triangle>& invec,
29
														 std::vector<Triangle>& lvec,
30
														 std::vector<Triangle>& lvec,
30
														 std::vector<Triangle>& rvec);
31
														 std::vector<Triangle>& rvec);
31
														 
32
														 
-
 
33
	const CGLA::Mat3x3f& get_rotation() const { return R; }
-
 
34
	const AABox& get_aabox() const { return aabox; }
32
 
35
 
33
/* 	const CGLA::Vec3f& get_pmin() const {assert(0); return CGLA::Vec3f(0);} */
36
/* 	const CGLA::Vec3f& get_pmin() const {assert(0); return CGLA::Vec3f(0);} */
34
 
37
 
35
/* 	const CGLA::Vec3f& get_pmax() const {assert(0); return CGLA::Vec3f(0);} */
38
/* 	const CGLA::Vec3f& get_pmax() const {assert(0); return CGLA::Vec3f(0);} */
36
 
39
 
37
};
40
};
38
 
41
 
-
 
42
}
39
#endif
43
#endif