NormalAlgorithms.hpp
Go to the documentation of this file.
1 
28 /*
29  * NormalAlgorithms.hpp
30  *
31  * Collection of algorithms for normal calculation.
32  *
33  * @date 19.07.2017
34  * @author Lukas Kalbertodt <lukas.kalbertodt@gmail.com>
35  * @author Johan M. von Behren <johan@vonbehren.eu>
36  */
37 
38 #ifndef LVR2_ALGORITHM_NORMALALGORITHMS_H_
39 #define LVR2_ALGORITHM_NORMALALGORITHMS_H_
40 
42 #include "lvr2/util/Cluster.hpp"
44 #include "lvr2/geometry/Normal.hpp"
47 
48 namespace lvr2
49 {
50 
57 template <typename BaseVecT>
58 boost::optional<Normal<typename BaseVecT::CoordType>> getFaceNormal(array<BaseVecT, 3> vertices);
59 
67 template<typename BaseVecT>
68 DenseFaceMap<Normal<typename BaseVecT::CoordType>> calcFaceNormals(const BaseMesh<BaseVecT>& mesh);
69 
74 template<typename BaseVecT>
75 boost::optional<Normal<typename BaseVecT::CoordType>> interpolatedVertexNormal(
76  const BaseMesh<BaseVecT>& mesh,
77  const FaceMap<Normal<typename BaseVecT::CoordType>>& normals,
78  VertexHandle handle
79 );
80 
90 template<typename BaseVecT>
91 DenseVertexMap<Normal<typename BaseVecT::CoordType>> calcVertexNormals(
92  const BaseMesh<BaseVecT>& mesh,
93  const FaceMap<Normal<typename BaseVecT::CoordType>>& normals,
94  const PointsetSurface<BaseVecT>& surface
95 );
96 
106 template<typename BaseVecT>
107 DenseVertexMap<Normal<typename BaseVecT::CoordType>> calcVertexNormals(
108  const BaseMesh<BaseVecT>& mesh,
109  const FaceMap<Normal<typename BaseVecT::CoordType>>& normals
110 );
111 
112 } // namespace lvr2
113 
114 #include "lvr2/algorithm/NormalAlgorithms.tcc"
115 
116 #endif /* LVR2_ALGORITHM_NORMALALGORITHMS_H_ */
lvr2::FaceMap
AttributeMap< FaceHandle, ValueT > FaceMap
Definition: AttrMaps.hpp:93
PointsetSurface.hpp
lvr2::interpolatedVertexNormal
boost::optional< Normal< typename BaseVecT::CoordType > > interpolatedVertexNormal(const BaseMesh< BaseVecT > &mesh, const FaceMap< Normal< typename BaseVecT::CoordType >> &normals, VertexHandle handle)
Returns a vertex normal for the given vertex interpolated from the normals of its adjacent faces.
AttrMaps.hpp
Cluster.hpp
lvr2::calcVertexNormals
DenseVertexMap< Normal< typename BaseVecT::CoordType > > calcVertexNormals(const BaseMesh< BaseVecT > &mesh, const FaceMap< Normal< typename BaseVecT::CoordType >> &normals, const PointsetSurface< BaseVecT > &surface)
Calculates a normal for each vertex in the mesh.
BaseMesh.hpp
ClusterBiMap.hpp
lvr2::getFaceNormal
boost::optional< Normal< typename BaseVecT::CoordType > > getFaceNormal(array< BaseVecT, 3 > vertices)
Returns the normal of a face with the given three vertices.
lvr2
Definition: BaseBufferManipulators.hpp:39
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::calcFaceNormals
DenseFaceMap< Normal< typename BaseVecT::CoordType > > calcFaceNormals(const BaseMesh< BaseVecT > &mesh)
Calculates a normal for each face in the mesh.
Normal.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:24