DataStruct.hpp
Go to the documentation of this file.
1 
40 #pragma once
41 
42 
43 #include <boost/shared_array.hpp>
44 
46 
47 #include <map>
48 #include <vector>
49 
50 namespace lvr2
51 {
52 
53 
54 template<typename CoordT>
55 struct coord
56 {
57  CoordT x;
58  CoordT y;
59  CoordT z;
60  CoordT& operator[]( const size_t i )
61  {
62  switch ( i )
63  {
64  case 0:
65  return x;
66  break;
67  case 1:
68  return y;
69  break;
70  case 2:
71  return z;
72  break;
73  default:
74  return z;
75  }
76  }
77 };
78 
79 
80 template<typename ColorT>
81 struct color
82 {
83  ColorT r;
84  ColorT g;
85  ColorT b;
86  ColorT& operator[] ( const size_t i )
87  {
88  switch ( i )
89  {
90  case 0:
91  return r;
92  break;
93  case 1:
94  return g;
95  break;
96  case 2:
97  return b;
98  break;
99  default:
100  return b;
101  }
102  }
103 };
104 
105 
106 template<typename T>
107 struct idxVal
108 {
109  T value;
110  T& operator[] ( const size_t i )
111  {
112  return value;
113  }
114 };
115 
116 
117 
119 {
120  unsigned char r;
121  unsigned char g;
122  unsigned char b;
124 };
125 
126 typedef boost::shared_array<int> intArray;
127 
128 typedef boost::shared_array<unsigned int> indexArray;
129 
130 typedef boost::shared_array<unsigned int> uintArr;
131 
132 
133 typedef boost::shared_array<float> floatArr;
134 typedef boost::shared_array<double> doubleArr;
135 
136 
137 typedef boost::shared_array<unsigned char> ucharArr;
138 
139 typedef boost::shared_array<short> shortArr;
140 
141 typedef boost::shared_array< color<unsigned char> > color3bArr;
142 
143 
144 typedef boost::shared_array< coord<float> > coord3fArr;
145 
146 
147 typedef boost::shared_array< idxVal<float> > idx1fArr;
148 
149 
150 typedef boost::shared_array< coord<unsigned int> > idx3uArr;
151 
152 
153 typedef boost::shared_array< idxVal<unsigned int> > idx1uArr;
154 
155 
156 typedef boost::shared_array< RGBMaterial* > materialArr;
157 
158 
159 typedef boost::shared_array< GlTexture* > textureArr;
160 
161 
162 typedef std::pair<size_t, size_t> indexPair;
163 
164 
165 typedef std::map<std::string, std::vector<unsigned int> > labeledFacesMap;
166 }
167 
unsigned char g
Definition: DataStruct.hpp:121
boost::shared_array< unsigned int > uintArr
Definition: DataStruct.hpp:130
boost::shared_array< RGBMaterial *> materialArr
Definition: DataStruct.hpp:156
boost::shared_array< coord< unsigned int > > idx3uArr
Definition: DataStruct.hpp:150
boost::shared_array< short > shortArr
Definition: DataStruct.hpp:139
boost::shared_array< int > intArray
Definition: DataStruct.hpp:126
boost::shared_array< double > doubleArr
Definition: DataStruct.hpp:134
boost::shared_array< GlTexture *> textureArr
Definition: DataStruct.hpp:159
boost::shared_array< unsigned char > ucharArr
Definition: DataStruct.hpp:137
unsigned char b
Definition: DataStruct.hpp:122
boost::shared_array< coord< float > > coord3fArr
Definition: DataStruct.hpp:144
boost::shared_array< unsigned int > indexArray
Definition: DataStruct.hpp:128
std::map< std::string, std::vector< unsigned int > > labeledFacesMap
Definition: DataStruct.hpp:165
boost::shared_array< float > floatArr
Definition: DataStruct.hpp:133
boost::shared_array< color< unsigned char > > color3bArr
Definition: DataStruct.hpp:141
boost::shared_array< idxVal< unsigned int > > idx1uArr
Definition: DataStruct.hpp:153
std::pair< size_t, size_t > indexPair
Definition: DataStruct.hpp:162
unsigned char r
Definition: DataStruct.hpp:120
boost::shared_array< idxVal< float > > idx1fArr
Definition: DataStruct.hpp:147
CoordT & operator[](const size_t i)
Definition: DataStruct.hpp:60


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:06