mirror of https://github.com/CGAL/cgal
add method to access the sum of weights
This commit is contained in:
parent
b899dc4549
commit
fd39972166
|
|
@ -84,6 +84,12 @@ public:
|
||||||
++(*this);
|
++(*this);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
double sum_of_weights() const
|
||||||
|
{
|
||||||
|
if (weights.empty())
|
||||||
|
return 0;
|
||||||
|
return weights.back();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template < typename Id, class ObjectFromIdMap, class GeneratorOnObject, class P >
|
template < typename Id, class ObjectFromIdMap, class GeneratorOnObject, class P >
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,10 @@ public:
|
||||||
++(*this);
|
++(*this);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
double mesh_area() const
|
||||||
|
{
|
||||||
|
this->sum_of_weights();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace internal
|
namespace internal
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue