36 #ifndef LVR2_ALGORITHM_MATERIALIZER_H_ 37 #define LVR2_ALGORITHM_MATERIALIZER_H_ 39 #include <boost/shared_ptr.hpp> 40 #include <boost/smart_ptr/make_shared.hpp> 41 #include <boost/optional.hpp> 59 #include <unordered_map> 60 #include <unordered_set> 72 template<
typename BaseVecT>
73 struct MaterializerResult
79 boost::optional<StableVector<TextureHandle, Texture>>
m_textures;
85 boost::optional<std::unordered_map<BaseVecT, std::vector<float>>>
m_keypoints;
95 m_clusterMaterials(clusterMaterials)
111 std::unordered_map<BaseVecT, std::vector<float>> keypoints
113 m_clusterMaterials(clusterMaterials),
114 m_textures(textures),
115 m_vertexTexCoords(vertexTexCoords),
116 m_keypoints(keypoints)
130 template<
typename BaseVecT>
199 #include "lvr2/algorithm/Materializer.tcc"
const PointsetSurface< BaseVecT > & m_surface
Point cloud.
void saveTextures(std::vector< int32_t > *textureValue, textureArr textures, size_t numTextures)
pushes the given textures in a int32_t vector to store it in the draco structure
A vector which guarantees stable indices and features O(1) deletion.
const ClusterBiMap< FaceHandle > & m_cluster
Clusters.
An interface class to wrap all functionality that is needed to generate a surface approximation from ...
Interface for triangle-meshes with adjacency information.
Class for calculating materials for each cluster of a given mesh.
boost::optional< SparseVertexMap< ClusterTexCoordMapping > > m_vertexTexCoords
Cluster texture coordinates for each vertex.
A map of clusters, which also saves a back-reference from handle to cluster.
const BaseMesh< BaseVecT > & m_mesh
Mesh.
boost::optional< Texturizer< BaseVecT > & > m_texturizer
Texturizer.
MaterializerResult(DenseClusterMap< Material > clusterMaterials, StableVector< TextureHandle, Texture > textures, SparseVertexMap< ClusterTexCoordMapping > vertexTexCoords, std::unordered_map< BaseVecT, std::vector< float >> keypoints)
Constructor.
Interface for attribute maps.
Class that performs texture-related tasks.
boost::optional< std::unordered_map< BaseVecT, std::vector< float > > > m_keypoints
Keypoints.
const FaceMap< Normal< typename BaseVecT::CoordType > > & m_normals
Normals.
Result struct for the materializer.
DenseClusterMap< Material > m_clusterMaterials
Materials for each cluster.
boost::optional< StableVector< TextureHandle, Texture > > m_textures
A stable vector of textures. each texture is identified by a tex.-handle.
A map with constant lookup overhead using small-ish integer-keys.
MaterializerResult(DenseClusterMap< Material > clusterMaterials)
Constructor.