synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
polygon.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_POLYGON_H
26
#define __SYNFIG_POLYGON_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include <vector>
31
#include "
vector.h
"
32
33
/* === M A C R O S ========================================================= */
34
35
/* === T Y P E D E F S ===================================================== */
36
37
/* === C L A S S E S & S T R U C T S ======================================= */
38
39
namespace
synfig {
40
41
class
Polygon
42
{
43
public
:
44
typedef
Vector
Vertex
;
45
46
class
Triangle
{
47
public
:
48
int
vertices
[3];
49
inline
Triangle
() {
vertices
[0] =
vertices
[1] =
vertices
[2] = 0; }
50
inline
Triangle
(
int
v0,
int
v1,
int
v2) {
vertices
[0] = v0;
vertices
[1] = v1;
vertices
[2] = v2; }
51
};
52
53
typedef
std::vector<Vertex>
VertexList
;
54
typedef
std::vector<Triangle>
TriangleList
;
55
56
VertexList
vertices
;
57
TriangleList
triangles
;
58
59
void
clear
() {
vertices
.clear();
triangles
.clear(); }
60
};
61
62
};
// END of namespace synfig
63
64
#endif
Generated on Mon Nov 16 2015 15:33:48 for synfig-core by
1.8.1.2