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 
121 
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_ */
lvr2::SimpleFinalizer::m_normalData
boost::optional< const VertexMap< Normal< typename BaseVecT::CoordType > > & > m_normalData
Definition: FinalizeAlgorithms.hpp:72
lvr2::TextureFinalizer::setVertexColors
void setVertexColors(const VertexMap< Rgb8Color > &vertexColors)
lvr2::AttributeMap
Interface for attribute maps.
Definition: AttributeMap.hpp:75
ObjIO.hpp
AttrMaps.hpp
lvr2::TextureFinalizer::setClusterColors
void setClusterColors(const ClusterMap< Rgb8Color > &colors)
lvr2::SimpleFinalizer::setNormalData
void setNormalData(const VertexMap< Normal< typename BaseVecT::CoordType >> &normalData)
lvr2::TextureFinalizer
Definition: FinalizeAlgorithms.hpp:105
lvr2::TextureFinalizer::setVertexNormals
void setVertexNormals(const VertexMap< Normal< typename BaseVecT::CoordType >> &normals)
lvr2::MaterializerResult
Result struct for the materializer.
Definition: FinalizeAlgorithms.hpp:61
lvr2::TextureFinalizer::m_clusterColors
boost::optional< const ClusterMap< Rgb8Color > & > m_clusterColors
Definition: FinalizeAlgorithms.hpp:162
lvr2::SimpleFinalizer
Definition: FinalizeAlgorithms.hpp:68
lvr2::SimpleFinalizer::m_colorData
boost::optional< const VertexMap< Rgb8Color > & > m_colorData
Definition: FinalizeAlgorithms.hpp:71
lvr2::Normal< typename BaseVecT::CoordType >
Texture.hpp
ClusterBiMap.hpp
lvr2::TextureFinalizer::TextureFinalizer
TextureFinalizer(const ClusterBiMap< FaceHandle > &cluster)
lvr2::SimpleFinalizer::setColorData
void setColorData(const VertexMap< Rgb8Color > &colorData)
scripts.create_png.colors
colors
Definition: create_png.py:41
MeshBuffer.hpp
lvr2::TextureFinalizer::m_cluster
const ClusterBiMap< FaceHandle > & m_cluster
Definition: FinalizeAlgorithms.hpp:154
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::MeshBufferPtr
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
Material.hpp
lvr2::TextureFinalizer::m_materializerResult
boost::optional< const MaterializerResult< BaseVecT > & > m_materializerResult
Definition: FinalizeAlgorithms.hpp:169
lvr2::BaseMesh
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
lvr2::TextureFinalizer::apply
MeshBufferPtr apply(const BaseMesh< BaseVecT > &mesh)
lvr2::TextureFinalizer::m_vertexNormals
boost::optional< const VertexMap< Normal< typename BaseVecT::CoordType > > & > m_vertexNormals
Definition: FinalizeAlgorithms.hpp:157
lvr2::TextureFinalizer::setMaterializerResult
void setMaterializerResult(const MaterializerResult< BaseVecT > &materializerResult)
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::ClusterBiMap
A map of clusters, which also saves a back-reference from handle to cluster.
Definition: ClusterBiMap.hpp:72
lvr2::TextureFinalizer::m_vertexColors
boost::optional< const VertexMap< Rgb8Color > & > m_vertexColors
Definition: FinalizeAlgorithms.hpp:166
ClusterPainter.hpp
lvr2::SimpleFinalizer::apply
MeshBufferPtr apply(const BaseMesh< BaseVecT > &mesh)
Normal.hpp
lvr2::SimpleFinalizer::SimpleFinalizer
SimpleFinalizer()
Definition: FinalizeAlgorithms.hpp:75
ColorAlgorithms.hpp


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