author | Radek Brich <radek.brich@devl.cz> |
Fri, 14 Dec 2007 16:51:22 +0100 | |
branch | pyrit |
changeset 39 | 7079dcc3bd74 |
parent 34 | 28f6e8b9d5d1 |
child 44 | 3763b26244f0 |
permissions | -rw-r--r-- |
34
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
1 |
/* |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
2 |
* Pyrit Ray Tracer |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
3 |
* file: container.h |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
4 |
* |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
5 |
* Radek Brich, 2006-2007 |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
6 |
*/ |
28f6e8b9d5d1
quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
7 |
|
24
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
8 |
#ifndef CONTAINER_H |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
9 |
#define CONTAINER_H |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
10 |
|
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
11 |
#include <vector> |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
12 |
|
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
13 |
#include "scene.h" |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
14 |
|
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
15 |
using namespace std; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
16 |
|
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
17 |
class Container |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
18 |
{ |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
19 |
protected: |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
20 |
BBox bbox; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
21 |
public: |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
22 |
ShapeList shapes; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
23 |
Container(): bbox(), shapes() {}; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
24 |
virtual ~Container() {}; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
25 |
virtual void addShape(Shape* aShape); |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
26 |
//void addShapeNoExtend(Shape* aShape) { shapes.push_back(aShape); }; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
27 |
virtual Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
28 |
Float &nearest_distance); |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
29 |
virtual void optimize() {}; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
30 |
}; |
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
31 |
|
d0d76e8a5203
new C++ demo: realtime_dragon.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
32 |
#endif |