35 #ifndef LVR2_ALGORITHM_CLUSTERPAINTER_H_ 36 #define LVR2_ALGORITHM_CLUSTERPAINTER_H_ 65 template<
typename BaseVecT>
73 static_cast<uint8_t
>(fabs(cos(idx)) * 255),
74 static_cast<uint8_t>(fabs(sin(idx * 30)) * 255),
75 static_cast<uint8_t>(fabs(sin(idx * 2)) * 255)
82 #include "lvr2/algorithm/ClusterPainter.tcc" ClusterBiMap< FaceHandle > m_clusterBiMap
Algorithm which generates the same color for all vertices, which are in the same cluster.
Interface for triangle-meshes with adjacency information.
A map of clusters, which also saves a back-reference from handle to cluster.
ClusterPainter(const ClusterBiMap< FaceHandle > &clusterBiMap)
DenseClusterMap< Rgb8Color > simpsons(const BaseMesh< BaseVecT > &mesh) const
Assign a pseudo-color to each cluster.
std::array< uint8_t, 3 > Rgb8Color
Rgb8Color getSimpsonColorForIdx(size_t idx) const
A map with constant lookup overhead using small-ish integer-keys.