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 
lvr2::floatArr
boost::shared_array< float > floatArr
Definition: DataStruct.hpp:133
lvr2::shortArr
boost::shared_array< short > shortArr
Definition: DataStruct.hpp:139
lvr2::indexPair
std::pair< size_t, size_t > indexPair
Definition: DataStruct.hpp:162
lvr2::coord
Definition: DataStruct.hpp:55
lvr2::RGBMaterial
Definition: DataStruct.hpp:118
lvr2::intArray
boost::shared_array< int > intArray
Definition: DataStruct.hpp:126
lvr2::idxVal::value
T value
Definition: DataStruct.hpp:109
lvr2::indexArray
boost::shared_array< unsigned int > indexArray
Definition: DataStruct.hpp:128
lvr2::idxVal
Definition: DataStruct.hpp:107
lvr2::color
Definition: DataStruct.hpp:81
lvr2::coord::z
CoordT z
Definition: DataStruct.hpp:59
lvr2::coord::y
CoordT y
Definition: DataStruct.hpp:58
lvr2::RGBMaterial::texture_index
int texture_index
Definition: DataStruct.hpp:123
lvr2::idx1uArr
boost::shared_array< idxVal< unsigned int > > idx1uArr
Definition: DataStruct.hpp:153
lvr2::RGBMaterial::r
unsigned char r
Definition: DataStruct.hpp:120
lvr2::color::r
ColorT r
Definition: DataStruct.hpp:83
lvr2::idx1fArr
boost::shared_array< idxVal< float > > idx1fArr
Definition: DataStruct.hpp:147
lvr2::textureArr
boost::shared_array< GlTexture * > textureArr
Definition: DataStruct.hpp:159
lvr2::idx3uArr
boost::shared_array< coord< unsigned int > > idx3uArr
Definition: DataStruct.hpp:150
lvr2::coord::operator[]
CoordT & operator[](const size_t i)
Definition: DataStruct.hpp:60
lvr2::RGBMaterial::b
unsigned char b
Definition: DataStruct.hpp:122
lvr2::color::b
ColorT b
Definition: DataStruct.hpp:85
lvr2::color::g
ColorT g
Definition: DataStruct.hpp:84
lvr2::labeledFacesMap
std::map< std::string, std::vector< unsigned int > > labeledFacesMap
Definition: DataStruct.hpp:165
lvr2::ucharArr
boost::shared_array< unsigned char > ucharArr
Definition: DataStruct.hpp:137
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::coord3fArr
boost::shared_array< coord< float > > coord3fArr
Definition: DataStruct.hpp:144
lvr2::color3bArr
boost::shared_array< color< unsigned char > > color3bArr
Definition: DataStruct.hpp:141
lvr2::materialArr
boost::shared_array< RGBMaterial * > materialArr
Definition: DataStruct.hpp:156
lvr2::idxVal::operator[]
T & operator[](const size_t i)
Definition: DataStruct.hpp:110
lvr2::RGBMaterial::g
unsigned char g
Definition: DataStruct.hpp:121
GlTexture.hpp
lvr2::doubleArr
boost::shared_array< double > doubleArr
Definition: DataStruct.hpp:134
lvr2::color::operator[]
ColorT & operator[](const size_t i)
Definition: DataStruct.hpp:86
lvr2::uintArr
boost::shared_array< unsigned int > uintArr
Definition: DataStruct.hpp:130
lvr2::coord::x
CoordT x
Definition: DataStruct.hpp:57


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 Wed Mar 2 2022 00:37:23