Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
types.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004 Tanguy Fautré.
3 // For conditions of distribution and use,
4 // see copyright notice in tri_stripper.h
5 //
7 // SVN: $Id: types.h 86 2005-06-08 17:47:27Z gpsnoopy $
9 
10 #ifndef TRI_STRIPPER_HEADER_GUARD_TYPES_H
11 #define TRI_STRIPPER_HEADER_GUARD_TYPES_H
12 
13 
14 
15 
16 namespace triangle_stripper {
17 
18  namespace detail {
19 
20 
21 
22 
23 class triangle
24 {
25 public:
26  triangle() { }
28  : m_A(A), m_B(B), m_C(C), m_StripID(0) { }
29 
30  void ResetStripID() { m_StripID = 0; }
31  void SetStripID(size_t StripID) { m_StripID = StripID; }
32  size_t StripID() const { return m_StripID; }
33 
34  index A() const { return m_A; }
35  index B() const { return m_B; }
36  index C() const { return m_C; }
37 
38 private:
39  index m_A;
40  index m_B;
41  index m_C;
42 
43  size_t m_StripID;
44 };
45 
46 
47 
49 {
50 public:
52  : m_A(A), m_B(B) { }
53 
54  index A() const { return m_A; }
55  index B() const { return m_B; }
56 
57  bool operator == (const triangle_edge & Right) const {
58  return ((A() == Right.A()) && (B() == Right.B()));
59  }
60 
61 private:
62  index m_A;
63  index m_B;
64 };
65 
66 
67 
69 
70 
71 
72 class strip
73 {
74 public:
76  : m_Start(0), m_Order(ABC), m_Size(0) { }
77 
78  strip(size_t Start, triangle_order Order, size_t Size)
79  : m_Start(Start), m_Order(Order), m_Size(Size) { }
80 
81  size_t Start() const { return m_Start; }
82  triangle_order Order() const { return m_Order; }
83  size_t Size() const { return m_Size; }
84 
85 private:
86  size_t m_Start;
87  triangle_order m_Order;
88  size_t m_Size;
89 };
90 
91 
92 
93 
94  } // namespace detail
95 
96 } // namespace triangle_stripper
97 
98 
99 
100 
101 #endif // TRI_STRIPPER_HEADER_GUARD_TYPES_H
triangle(index A, index B, index C)
Definition: types.h:27
void SetStripID(size_t StripID)
Definition: types.h:31
strip(size_t Start, triangle_order Order, size_t Size)
Definition: types.h:78
bool operator==(const ref< T1 > &o1, const ref< T2 > &o2)
Definition: Object.hpp:144
unsigned int index
Definition: public_types.h:21
triangle_order Order() const
Definition: types.h:82