Go to the documentation of this file.
17 template<
typename GeometryTraits,
typename Vector_t >
24 double cos_phi = geom.dot_product(n1, n2);
26 double gcontrast = std::sqrt(
fabs(1. - cos_phi) / (1. + cos_phi));
31 double n = geom.dot_product(ns, ldir);
32 double m = geom.dot_product(nd, ldir);
34 double theta = (std::max)(n, 0.);
35 double alpha = std::abs(m);
37 double lcontrast = (theta == 0 || (alpha != alpha))
40 return lcontrast * gcontrast;
44 template<
typename Light_t,
45 typename GeometryTraits,
46 typename HalfedgeGraph,
47 typename FaceNormalMap,
52 const HalfedgeGraph &mesh,
53 const FaceNormalMap &f_nm,
58 auto f2 =
face(op_f, mesh);
60 auto normal_f1 =
get(f_nm, f1);
61 auto normal_f2 =
get(f_nm, f2);
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor opposite(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the halfedge with source and target swapped.
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::property_map< FEVV::DataStructures::AIF::AIFMesh, boost::vertex_index_t >::const_type get(const boost::vertex_index_t &, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the vertex index property map of the mesh.
double fabs(const v_Curv< HalfedgeGraph > &input)
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_descriptor face(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the face incident to halfedge h.
double compute_flat_contrast(const GeometryTraits &geom, const Vector_t &n1, const Vector_t &n2, const Vector_t &ldir)