Commit ff959cf9 authored by Mike Kremer's avatar Mike Kremer

Corrected barycenter function to compute correct values.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@193 66977474-1d4b-4f09-8fe9-267525286df2
parent fb6f3507
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
} }
PointT barycenter(const FaceHandle& _fh) const { PointT barycenter(const FaceHandle& _fh) const {
PointT p; PointT p(typename PointT::value_type(0));
typename PointT::value_type valence = 0; typename PointT::value_type valence = 0;
HalfFaceVertexIter hfv_it = HalfFaceVertexIter hfv_it =
TopologyKernelT::hfv_iter(TopologyKernelT::halfface_handle(_fh, 0)); TopologyKernelT::hfv_iter(TopologyKernelT::halfface_handle(_fh, 0));
...@@ -123,7 +123,7 @@ public: ...@@ -123,7 +123,7 @@ public:
} }
PointT barycenter(const CellHandle& _ch) const { PointT barycenter(const CellHandle& _ch) const {
PointT p; PointT p(typename PointT::value_type(0));
typename PointT::value_type valence = 0; typename PointT::value_type valence = 0;
CellVertexIter cv_it = TopologyKernelT::cv_iter(_ch); CellVertexIter cv_it = TopologyKernelT::cv_iter(_ch);
for(; cv_it.valid(); ++cv_it, valence += 1) { for(; cv_it.valid(); ++cv_it, valence += 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment