Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
b1d1676b
Commit
b1d1676b
authored
Nov 25, 2015
by
Jan Möbius
Browse files
Merge branch 'master' into vectort-python-compat
parents
d5612f16
a04d46d6
Pipeline
#137
failed with stage
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CI/ci-mac.sh
View file @
b1d1676b
...
@@ -28,7 +28,7 @@ fi
...
@@ -28,7 +28,7 @@ fi
cd
build-release
cd
build-release
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DOPENMESH_BUILD_UNIT_TESTS
=
TRUE
$OPTIONS
../
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DOPENMESH_BUILD_UNIT_TESTS
=
TRUE
-DSTL_VECTOR_CHECKS
=
ON
-DOPENMESH_BUILD_PYTHON_UNIT_TESTS
=
ON
$OPTIONS
../
#build it
#build it
make
make
...
@@ -45,6 +45,14 @@ cd Unittests
...
@@ -45,6 +45,14 @@ cd Unittests
#execute tests
#execute tests
./unittests
--gtest_color
=
yes
--gtest_output
=
xml
./unittests
--gtest_color
=
yes
--gtest_output
=
xml
# Execute Python unittests
cd
Python-Unittests
rm
-f
openmesh.so
cp
../Build/python/openmesh.so
.
python
-m
unittest discover
-v
cd
..
cd
..
cd
..
cd
..
cd
..
...
@@ -59,7 +67,7 @@ fi
...
@@ -59,7 +67,7 @@ fi
cd
build-debug
cd
build-debug
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DOPENMESH_BUILD_UNIT_TESTS
=
TRUE
$OPTIONS
../
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DOPENMESH_BUILD_UNIT_TESTS
=
TRUE
-DSTL_VECTOR_CHECKS
=
ON
-DOPENMESH_BUILD_PYTHON_UNIT_TESTS
=
ON
$OPTIONS
../
#build the unit tests
#build the unit tests
make unittests
make unittests
...
@@ -74,4 +82,9 @@ cd Unittests
...
@@ -74,4 +82,9 @@ cd Unittests
# Run the unittests
# Run the unittests
./unittests
--gtest_color
=
yes
--gtest_output
=
xml
./unittests
--gtest_color
=
yes
--gtest_output
=
xml
# Execute Python unittests
cd
Python-Unittests
rm
-f
openmesh.so
cp
../Build/python/openmesh.so
.
python
-m
unittest discover
-v
src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh
View file @
b1d1676b
...
@@ -114,7 +114,7 @@ public:
...
@@ -114,7 +114,7 @@ public:
typedef
Decimater
::
ModNormalFlippingT
<
mesh_t
>::
Handle
mod_nf_t
;
typedef
Decimater
::
ModNormalFlippingT
<
mesh_t
>::
Handle
mod_nf_t
;
// object types
// object types
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
typedef
std
::
unique_ptr
<
decimater_t
>
decimater_o
;
typedef
std
::
unique_ptr
<
decimater_t
>
decimater_o
;
#else
#else
typedef
std
::
auto_ptr
<
decimater_t
>
decimater_o
;
typedef
std
::
auto_ptr
<
decimater_t
>
decimater_o
;
...
...
src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc
View file @
b1d1676b
...
@@ -131,7 +131,7 @@ public:
...
@@ -131,7 +131,7 @@ public:
bool
bind
(
osg
::
GeometryPtr
geo
)
bool
bind
(
osg
::
GeometryPtr
geo
)
{
{
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
std
::
unique_ptr
<
mesh_t
>
obj
(
new
mesh_t
);
std
::
unique_ptr
<
mesh_t
>
obj
(
new
mesh_t
);
#else
#else
std
::
auto_ptr
<
mesh_t
>
obj
(
new
mesh_t
);
std
::
auto_ptr
<
mesh_t
>
obj
(
new
mesh_t
);
...
...
src/OpenMesh/Core/Geometry/VectorT.hh
View file @
b1d1676b
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
// macro expansion and preprocessor defines
// macro expansion and preprocessor defines
// don't work properly.
// don't work properly.
#if (__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
#if (
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
#include
"Vector11T.hh"
#include
"Vector11T.hh"
#else
#else
#ifndef DOXYGEN
#ifndef DOXYGEN
...
...
src/OpenMesh/Core/System/mostream.hh
View file @
b1d1676b
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
#include
<string>
#include
<string>
#include
<algorithm>
#include
<algorithm>
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#include
<mutex>
#include
<mutex>
#endif
#endif
...
@@ -189,7 +189,7 @@ protected:
...
@@ -189,7 +189,7 @@ protected:
virtual
int
sync
()
virtual
int
sync
()
{
{
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std
::
lock_guard
<
std
::
mutex
>
lck
(
serializer_
);
std
::
lock_guard
<
std
::
mutex
>
lck
(
serializer_
);
#endif
#endif
...
@@ -214,7 +214,7 @@ protected:
...
@@ -214,7 +214,7 @@ protected:
char
c
=
traits_type
::
to_char_type
(
_c
);
char
c
=
traits_type
::
to_char_type
(
_c
);
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
{
{
std
::
lock_guard
<
std
::
mutex
>
lck
(
serializer_
);
std
::
lock_guard
<
std
::
mutex
>
lck
(
serializer_
);
buffer_
.
push_back
(
c
);
buffer_
.
push_back
(
c
);
...
@@ -264,7 +264,7 @@ private:
...
@@ -264,7 +264,7 @@ private:
bool
enabled_
;
bool
enabled_
;
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std
::
mutex
serializer_
;
std
::
mutex
serializer_
;
#endif
#endif
...
...
src/OpenMesh/Core/Utils/PropertyManager.hh
View file @
b1d1676b
...
@@ -76,7 +76,7 @@ namespace OpenMesh {
...
@@ -76,7 +76,7 @@ namespace OpenMesh {
*/
*/
template
<
typename
PROPTYPE
,
typename
MeshT
>
template
<
typename
PROPTYPE
,
typename
MeshT
>
class
PropertyManager
{
class
PropertyManager
{
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
public:
public:
PropertyManager
(
const
PropertyManager
&
)
=
delete
;
PropertyManager
(
const
PropertyManager
&
)
=
delete
;
PropertyManager
&
operator
=
(
const
PropertyManager
&
)
=
delete
;
PropertyManager
&
operator
=
(
const
PropertyManager
&
)
=
delete
;
...
@@ -148,7 +148,7 @@ class PropertyManager {
...
@@ -148,7 +148,7 @@ class PropertyManager {
MeshT
&
getMesh
()
const
{
return
*
mesh_
;
}
MeshT
&
getMesh
()
const
{
return
*
mesh_
;
}
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Only for pre C++11 compatibility.
/// Only for pre C++11 compatibility.
typedef
PropertyManager
<
PROPTYPE
,
MeshT
>
Proxy
;
typedef
PropertyManager
<
PROPTYPE
,
MeshT
>
Proxy
;
...
...
src/OpenMesh/Tools/Decimater/DecimaterT.cc
View file @
b1d1676b
...
@@ -78,7 +78,7 @@ template<class Mesh>
...
@@ -78,7 +78,7 @@ template<class Mesh>
DecimaterT
<
Mesh
>::
DecimaterT
(
Mesh
&
_mesh
)
:
DecimaterT
<
Mesh
>::
DecimaterT
(
Mesh
&
_mesh
)
:
BaseDecimaterT
<
Mesh
>
(
_mesh
),
BaseDecimaterT
<
Mesh
>
(
_mesh
),
mesh_
(
_mesh
),
mesh_
(
_mesh
),
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_
(
nullptr
)
heap_
(
nullptr
)
#else
#else
heap_
(
NULL
)
heap_
(
NULL
)
...
@@ -178,7 +178,7 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
...
@@ -178,7 +178,7 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
// initialize heap
// initialize heap
HeapInterface
HI
(
mesh_
,
priority_
,
heap_position_
);
HeapInterface
HI
(
mesh_
,
priority_
,
heap_position_
);
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_
=
std
::
unique_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
heap_
=
std
::
unique_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
#else
#else
heap_
=
std
::
auto_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
heap_
=
std
::
auto_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
...
@@ -279,7 +279,7 @@ size_t DecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
...
@@ -279,7 +279,7 @@ size_t DecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
// initialize heap
// initialize heap
HeapInterface
HI
(
mesh_
,
priority_
,
heap_position_
);
HeapInterface
HI
(
mesh_
,
priority_
,
heap_position_
);
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_
=
std
::
unique_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
heap_
=
std
::
unique_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
#else
#else
heap_
=
std
::
auto_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
heap_
=
std
::
auto_ptr
<
DeciHeap
>
(
new
DeciHeap
(
HI
));
...
...
src/OpenMesh/Tools/Decimater/DecimaterT.hh
View file @
b1d1676b
...
@@ -173,7 +173,7 @@ private: //------------------------------------------------------- private data
...
@@ -173,7 +173,7 @@ private: //------------------------------------------------------- private data
Mesh
&
mesh_
;
Mesh
&
mesh_
;
// heap
// heap
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std
::
unique_ptr
<
DeciHeap
>
heap_
;
std
::
unique_ptr
<
DeciHeap
>
heap_
;
#else
#else
std
::
auto_ptr
<
DeciHeap
>
heap_
;
std
::
auto_ptr
<
DeciHeap
>
heap_
;
...
...
src/OpenMesh/Tools/Utils/HeapT.hh
View file @
b1d1676b
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
#include
"Config.hh"
#include
"Config.hh"
#include
<vector>
#include
<vector>
#include
<OpenMesh/Core/System/omstream.hh>
#include
<OpenMesh/Core/System/omstream.hh>
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#include
<utility>
#include
<utility>
#endif
#endif
...
@@ -150,7 +150,7 @@ public:
...
@@ -150,7 +150,7 @@ public:
/// Constructor
/// Constructor
HeapT
()
:
HeapVector
()
{}
HeapT
()
:
HeapVector
()
{}
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Construct with a given \c HeapIterface.
/// Construct with a given \c HeapIterface.
HeapT
(
HeapInterface
_interface
)
HeapT
(
HeapInterface
_interface
)
:
HeapVector
(),
interface_
(
std
::
move
(
_interface
))
:
HeapVector
(),
interface_
(
std
::
move
(
_interface
))
...
...
src/Unittests/unittests_cpp_11_features.cc
View file @
b1d1676b
...
@@ -53,7 +53,7 @@ class OpenMesh_Triangle : public OpenMeshBase {
...
@@ -53,7 +53,7 @@ class OpenMesh_Triangle : public OpenMeshBase {
* ====================================================================
* ====================================================================
*/
*/
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/*
/*
*/
*/
...
...
src/Unittests/unittests_vector_type.cc
View file @
b1d1676b
...
@@ -84,7 +84,7 @@ TEST_F(OpenMeshVectorTest, VectorCasting) {
...
@@ -84,7 +84,7 @@ TEST_F(OpenMeshVectorTest, VectorCasting) {
}
}
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if
_MSC_VER >= 1900 ||
__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
TEST_F
(
OpenMeshVectorTest
,
cpp11_constructors
)
{
TEST_F
(
OpenMeshVectorTest
,
cpp11_constructors
)
{
OpenMesh
::
Vec3d
vec1
{
1.2
,
2.0
,
3.0
};
OpenMesh
::
Vec3d
vec1
{
1.2
,
2.0
,
3.0
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment