Go to the documentation of this file.
13 #include <boost/graph/graph_traits.hpp>
36 template<
typename HalfedgeGraph,
39 typename VertexTangentMap >
42 typename boost::graph_traits< HalfedgeGraph >::face_descriptor f,
43 const HalfedgeGraph &g,
48 VertexTangentMap &vtm)
51 using halfedge_descriptor =
52 typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor;
85 halfedge_descriptor half_edge =
halfedge(f, g);
98 const halfedge_descriptor first_he = half_edge;
103 const Vector new_tan =
get(vtm, vert) + tan;
104 put(vtm, vert, new_tan);
106 half_edge =
next(half_edge, g);
107 }
while(half_edge != first_he);
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.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
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.
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.
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
void put(FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key, const FEVV::PCLPointCloudPointMap::value_type &value)
Specialization of put(point_map, key, value) for PCLPointCloud.
Vector calculate_triangle_tangent(const Point &pt1, const Point &pt2, const Point &pt3, const Vector &uv1, const Vector &uv2, const Vector &uv3)
Calculate the actual face tangent from three connected vertices' positions & texture coordinates.
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...