38 #ifndef LVR2_ALGORITHM_NORMALALGORITHMS_H_ 39 #define LVR2_ALGORITHM_NORMALALGORITHMS_H_ 57 template <
typename BaseVecT>
58 boost::optional<Normal<typename BaseVecT::CoordType>>
getFaceNormal(array<BaseVecT, 3> vertices);
67 template<
typename BaseVecT>
68 DenseFaceMap<Normal<typename BaseVecT::CoordType>>
calcFaceNormals(
const BaseMesh<BaseVecT>&
mesh);
74 template<
typename BaseVecT>
76 const BaseMesh<BaseVecT>&
mesh,
77 const FaceMap<Normal<typename BaseVecT::CoordType>>& normals,
90 template<
typename BaseVecT>
92 const BaseMesh<BaseVecT>&
mesh,
93 const FaceMap<Normal<typename BaseVecT::CoordType>>& normals,
94 const PointsetSurface<BaseVecT>& surface
106 template<
typename BaseVecT>
108 const BaseMesh<BaseVecT>&
mesh,
109 const FaceMap<Normal<typename BaseVecT::CoordType>>& normals
114 #include "lvr2/algorithm/NormalAlgorithms.tcc"
boost::optional< Normal< typename BaseVecT::CoordType > > getFaceNormal(array< BaseVecT, 3 > vertices)
Returns the normal of a face with the given three vertices.
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.
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...
DenseFaceMap< Normal< typename BaseVecT::CoordType > > calcFaceNormals(const BaseMesh< BaseVecT > &mesh)
Calculates a normal for each face in the mesh.
AttributeMap< FaceHandle, ValueT > FaceMap