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