blob: 5746faef54c84b2334abcf630c77f870fe4cdcba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
model/trianglelist.h
This file is part of the Osirion project and is distributed under
the terms of the GNU General Public License version 2
*/
#ifndef __INCLUDED_MODEL_TRIANGLELIST_H__
#define __INCLUDED_MODEL_TRIANGLELIST_H__
#include <list>
#include "model/triangle.h"
namespace model
{
class TriangleList {
public:
typedef std::list<Triangle *> Triangles;
typedef Triangles::iterator iterator;
typedef Triangles::const_iterator const_iterator;
TriangleList();
~TriangleList();
void clear();
Triangle *add(const math::Vector3f &v0, const math::Vector3f &v1, const math::Vector3f &v2);
Triangle *add(Triangle &triangle);
inline const size_t size() const { return trianglelist_triangles.size(); }
inline iterator begin() { return trianglelist_triangles.begin(); }
inline iterator end() { return trianglelist_triangles.end(); }
private:
Triangles trianglelist_triangles;
};
} // namespace model
#endif // __INCLUDED_MODEL_TRIANGLELIST_H__
|