Go to the documentation of this file.
13 #include <boost/graph/graph_traits.hpp>
33 template<
typename HalfedgeGraph,
36 typename VertexTangentMap >
40 const VertexUVMap &vum,
41 VertexTangentMap &vtm)
46 using GraphTraits =
typename boost::graph_traits< HalfedgeGraph >;
47 using face_iterator =
typename GraphTraits::face_iterator;
49 using halfedge_descriptor =
50 typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor;
52 const GeometryTraits gt(g);
55 for(boost::tie(fb, fe) =
faces(g); fb != fe; ++fb)
57 halfedge_descriptor half_edge =
halfedge(*fb, g);
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor next(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the next halfedge around its face.
void normalize_vector_map_vertices(const HalfedgeGraph &g, PropertyMap &prop_map)
Normalize each vector of the vertex property map.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor source(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the source vertex of e.
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
Interfaces for plugins These interfaces will be used for different plugins.
std::pair< typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_iterator, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_iterator > faces(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns an iterator range over all faces of the mesh.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor halfedge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns a halfedge with target v.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor target(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the target vertex of e.
void calculate_vertices_tangent(const HalfedgeGraph &g, const PointMap &pm, const VertexUVMap &vum, VertexTangentMap &vtm)
Calculate the mesh's tangents from its vertices.
void calculate_face_tangent(typename boost::graph_traits< HalfedgeGraph >::face_descriptor f, const HalfedgeGraph &g, const PointMap &pm, const Vector &uv1, const Vector &uv2, const Vector &uv3, VertexTangentMap &vtm)
Calculate a face tangent, then accumulate its value on every vertices it contains to average them; fi...