FinalizeAlgorithms.hpp
Go to the documentation of this file.
1 
28 /*
29  * FinalizeAlgorithms.hpp
30  *
31  * @date 13.06.2017
32  * @author Johan M. von Behren <johan@vonbehren.eu>
33  */
34 
35 #ifndef LVR2_ALGORITHM_FINALIZEALGORITHM_H_
36 #define LVR2_ALGORITHM_FINALIZEALGORITHM_H_
37 
38 #include <boost/shared_ptr.hpp>
39 #include <boost/smart_ptr/make_shared.hpp>
40 #include <boost/optional.hpp>
41 
42 
43 
44 #include "lvr2/io/MeshBuffer.hpp"
45 #include "lvr2/geometry/Normal.hpp"
49 #include "lvr2/texture/Texture.hpp"
52 
53 #include "lvr2/io/ObjIO.hpp"
54 
55 namespace lvr2
56 {
57 
58 
59 // Forward declaration
60 template<typename BaseVecT>
62 
67 template<typename BaseVecT>
69 {
70 private:
71  boost::optional<const VertexMap<Rgb8Color>&> m_colorData;
72  boost::optional<const VertexMap<Normal<typename BaseVecT::CoordType>>&> m_normalData;
73 
74 public:
76 
84 
90  void setColorData(const VertexMap<Rgb8Color>& colorData);
91 
98 };
99 
104 template<typename BaseVecT>
106 {
107 public:
114 
120  void setVertexNormals(const VertexMap<Normal<typename BaseVecT::CoordType>>& normals);
121 
127  void setClusterColors(const ClusterMap<Rgb8Color>& colors);
128 
134  void setVertexColors(const VertexMap<Rgb8Color>& vertexColors);
135 
141  void setMaterializerResult(const MaterializerResult<BaseVecT>& materializerResult);
142 
150 
151 private:
152 
153  // Clusters of mesh (mandatory)
155 
156  // Normals (optional)
157  boost::optional<const VertexMap<Normal<typename BaseVecT::CoordType>>&> m_vertexNormals;
158 
159  // Basic colors
160  // Cluster colors will color each vertex in the color of its corresponding cluster
161  // These have lower priority when cluster colors, as only one mode can be used
162  boost::optional<const ClusterMap<Rgb8Color>&> m_clusterColors;
163 
164  // Vertex colors will color each vertex individually
165  // These have a higher priority than cluster colors
166  boost::optional<const VertexMap<Rgb8Color>&> m_vertexColors;
167 
168  // Materials and textures
169  boost::optional<const MaterializerResult<BaseVecT>&> m_materializerResult;
170 };
171 
172 } // namespace lvr2
173 
174 #include "lvr2/algorithm/FinalizeAlgorithms.tcc"
175 
176 #endif /* LVR2_ALGORITHM_FINALIZEALGORITHM_H_ */
boost::optional< const VertexMap< Rgb8Color > & > m_vertexColors
HalfEdgeMesh< Vec > mesh
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
boost::optional< const MaterializerResult< BaseVecT > & > m_materializerResult
boost::optional< const VertexMap< Rgb8Color > & > m_colorData
void setNormalData(const VertexMap< Normal< typename BaseVecT::CoordType >> &normalData)
MeshBufferPtr apply(const BaseMesh< BaseVecT > &mesh)
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
boost::optional< const VertexMap< Normal< typename BaseVecT::CoordType > > & > m_normalData
A map of clusters, which also saves a back-reference from handle to cluster.
void setColorData(const VertexMap< Rgb8Color > &colorData)
Interface for attribute maps.
boost::optional< const VertexMap< Normal< typename BaseVecT::CoordType > > & > m_vertexNormals
Result struct for the materializer.
boost::optional< const ClusterMap< Rgb8Color > & > m_clusterColors
const ClusterBiMap< FaceHandle > & m_cluster


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