Commit cd4e65f3 authored by Martin Schultz's avatar Martin Schultz

Merge branch 'master' of...

Merge branch 'master' of https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh into featureSplitCopyInternal
parents fcee4209 77251c5d
Pipeline #5350 passed with stage
in 78 minutes and 50 seconds
......@@ -19,8 +19,15 @@
<li>make all negative handles invalid, not just -1</li>
<li>Several warnings fixed (Including the checked iterators)</li>
<li>split_copy and split_edge_copy operations now also copy internal properties.</li>
<li>fix halfedge indices in OpenMeshTrimeshCirculatorHalfedgeLoop CWAndCCWCheck</li>
<li>Fix wrong behaviour of HalfedgeLoopIterators by changing the template parameter</li>
<li>Added 1-4 triangle split funtion(splits all edges at Midpoints)</li>
</ul>
<b>Utils</b>
<ul>
<li>enable c++11 features of many classes for Visual Studio 2013</li>
</ul>
<b>Tools</b>
<ul>
......@@ -31,6 +38,7 @@
<b>Geometry</b>
<ul>
<li>QuadricT: implement Q+Q and Q*scalar operators for convenience.</li>
<li>Vector11T: Make converting ctor only accept 2 arguments</li>
</ul>
......@@ -42,6 +50,9 @@
<li>OBJ Loader: fixed handling of negative indices in OBJ loader</li>
<li>OM Writer: Fixed OMWriter when no faces are available (Thanks to Jamie Kydd for the patch)</li>
<li>OM Writer: Added Mark to the format header to identify end of stream correctly (Thanks to Jamie Kydd for the patch)</li>
<li>PLY Reader: Skip reading extra elements after face</li>
<li>PLY Reader: Return error when reaching EOF</li>
</ul>
<b>Unittests</b>
......
......@@ -45,7 +45,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/include
~/sw/gtest-1.7.0/include
~/sw/gtest/include
/ACG/acgdev/gcc-4.7-x86_64/gtest/include
/ACG/acgdev/gcc-x86_64/gtest/include
/opt/local/include
/usr/local/include
/usr/include
......@@ -56,7 +56,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/lib
~/sw/gtest-1.7.0/lib
~/sw/gtest/lib
/ACG/acgdev/gcc-4.7-x86_64/gtest/lib
/ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib
/usr/local/lib
/usr/lib
......@@ -67,7 +67,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
~/sw/gtest-1.8.0/lib
~/sw/gtest-1.7.0/lib
~/sw/gtest/lib
/ACG/acgdev/gcc-4.7-x86_64/gtest/lib
/ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib
/usr/local/lib
/usr/lib
......
......@@ -218,7 +218,7 @@ public:
template <class _Vec>
Scalar operator()(const _Vec& _v) const
{
return evaluate(_v, GenProg::Int2Type<_Vec::size_>());
return evaluate(_v, GenProg::Int2Type<vector_traits<_Vec>::size_>());
}
Scalar a() const { return a_; }
......
......@@ -1123,6 +1123,9 @@ public:
ITER_TYPE (CONTAINER_TYPE::*end_fn)() const>
class EntityRange {
public:
typedef ITER_TYPE iterator;
typedef ITER_TYPE const_iterator;
EntityRange(CONTAINER_TYPE &container) : container_(container) {}
ITER_TYPE begin() const { return (container_.*begin_fn)(); }
ITER_TYPE end() const { return (container_.*end_fn)(); }
......@@ -1184,12 +1187,15 @@ public:
ITER_TYPE (CONTAINER_TYPE::*end_fn)(CENTER_ENTITY_TYPE) const>
class CirculatorRange {
public:
typedef ITER_TYPE iterator;
typedef ITER_TYPE const_iterator;
CirculatorRange(
const CONTAINER_TYPE &container,
CENTER_ENTITY_TYPE center) :
container_(container), center_(center) {}
ITER_TYPE begin() { return (container_.*begin_fn)(center_); }
ITER_TYPE end() { return (container_.*end_fn)(center_); }
ITER_TYPE begin() const { return (container_.*begin_fn)(center_); }
ITER_TYPE end() const { return (container_.*end_fn)(center_); }
private:
const CONTAINER_TYPE &container_;
......
......@@ -249,6 +249,72 @@ TEST_F(OpenMesh_Poly, cpp11_vvrange_test) {
EXPECT_EQ(iteration_counter,4);
}
/**
* @brief Test combined vertex iterator and vertex vertex iter.
*/
TEST_F(OpenMesh_Triangle, cpp11_test_enumerate_combined_run) {
//check empty vv_range
mesh_.clear();
Mesh::VertexHandle vhandle[5];
vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0));
for(Mesh::VertexHandle t : mesh_.vv_range(vhandle[0]))
{
FAIL() << "The vvrange for a single vertex in a TriMesh is not empty";
EXPECT_TRUE(t.is_valid()); // Just so we don't get an unused variable warning.
}
//add more vertices
vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0));
vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 3));
vhandle[3] = mesh_.add_vertex(Mesh::Point(0,-1, 4));
vhandle[4] = mesh_.add_vertex(Mesh::Point(2,3, 5));
// Add 4 faces
std::vector<Mesh::VertexHandle> face_vhandles;
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]);
mesh_.add_face(face_vhandles);
face_vhandles.clear();
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles);
face_vhandles.clear();
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[1]);
mesh_.add_face(face_vhandles);
face_vhandles.clear();
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles);
Mesh::Point p = Mesh::Point(0,0,0);
for ( auto vh : mesh_.vertices() ) {
for ( auto vv_it : mesh_.vv_range(vh) ) {
p += mesh_.point(vv_it);
}
}
EXPECT_EQ(p[0],16);
EXPECT_EQ(p[1],12);
EXPECT_EQ(p[2],36);
}
#endif
}
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