Merge branch 'CustomProperties' of https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh into CustomProperties
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
include (ACGCommon)
|
||||
include (VCICommon)
|
||||
|
||||
include_directories (
|
||||
../..
|
||||
@@ -21,12 +21,12 @@ set (directories
|
||||
)
|
||||
|
||||
# collect all header and source files
|
||||
acg_append_files (headers "*.hh" ${directories})
|
||||
acg_append_files (sources "*.cc" ${directories})
|
||||
vci_append_files (headers "*.hh" ${directories})
|
||||
vci_append_files (sources "*.cc" ${directories})
|
||||
|
||||
# Disable Library installation when not building OpenMesh on its own but as part of another project!
|
||||
if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh")
|
||||
set(ACG_NO_LIBRARY_INSTALL true)
|
||||
set(VCI_NO_LIBRARY_INSTALL true)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ if (WIN32)
|
||||
|
||||
if ( OPENMESH_BUILD_SHARED )
|
||||
add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL)
|
||||
acg_add_library (OpenMeshCore SHARED ${sources} ${headers})
|
||||
vci_add_library (OpenMeshCore SHARED ${sources} ${headers})
|
||||
else()
|
||||
# OpenMesh has no dll exports so we have to build a static library on windows
|
||||
acg_add_library (OpenMeshCore STATIC ${sources} ${headers})
|
||||
vci_add_library (OpenMeshCore STATIC ${sources} ${headers})
|
||||
endif()
|
||||
|
||||
else ()
|
||||
acg_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers})
|
||||
vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers})
|
||||
set_target_properties (OpenMeshCore PROPERTIES VERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR}
|
||||
SOVERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR} )
|
||||
endif ()
|
||||
@@ -79,7 +79,7 @@ endif()
|
||||
|
||||
|
||||
# Install Header Files (Apple)
|
||||
if ( NOT ACG_PROJECT_MACOS_BUNDLE AND APPLE )
|
||||
if ( NOT VCI_PROJECT_MACOS_BUNDLE AND APPLE )
|
||||
FILE(GLOB files_install_Geometry "${CMAKE_CURRENT_SOURCE_DIR}/Geometry/*.hh" )
|
||||
FILE(GLOB files_install_IO "${CMAKE_CURRENT_SOURCE_DIR}/IO/*.hh" "${CMAKE_CURRENT_SOURCE_DIR}/IO/*.inl" )
|
||||
FILE(GLOB files_install_IO_importer "${CMAKE_CURRENT_SOURCE_DIR}/IO/importer/*.hh" )
|
||||
@@ -140,7 +140,7 @@ target_include_directories(OpenMeshCore PUBLIC
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS OpenMeshCore EXPORT OpenMeshConfig
|
||||
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR}
|
||||
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
|
||||
RUNTIME DESTINATION ${ACG_PROJECT_BINDIR})
|
||||
ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
RUNTIME DESTINATION ${VCI_PROJECT_BINDIR})
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenMesh {
|
||||
//== CLASS DEFINITION =========================================================
|
||||
|
||||
|
||||
/** /class NormalCone NormalCone.hh <ACG/Geometry/Types/NormalCone.hh>
|
||||
/** /class NormalCone NormalCone.hh <OpenMesh/Core/Geometry/NormalConeT.hh>
|
||||
|
||||
NormalCone that can be merged with other normal cones. Provides
|
||||
the center normal and the opening angle.
|
||||
|
||||
@@ -662,24 +662,24 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
case Chunk::Type_Texcoord:
|
||||
{
|
||||
assert( OMFormat::dimensions(chunk_header_) == size_t(OpenMesh::Vec2f::dim()));
|
||||
|
||||
//fileOptions_ += OpenMesh::IO::Options::FaceTexCoord;
|
||||
|
||||
if (_opt.face_has_texcoord())
|
||||
case Chunk::Type_Texcoord:
|
||||
{
|
||||
_bi.request_face_texcoords2D();
|
||||
}
|
||||
OpenMesh::Vec2f v2f;
|
||||
for (size_t e_idx = 0; e_idx < header_.n_edges_*2; ++e_idx)
|
||||
{
|
||||
bytes_ += vector_restore(_is, v2f, _swap);
|
||||
assert( OMFormat::dimensions(chunk_header_) == size_t(OpenMesh::Vec2f::dim()));
|
||||
|
||||
//fileOptions_ += OpenMesh::IO::Options::FaceTexCoord;
|
||||
|
||||
if (_opt.face_has_texcoord())
|
||||
_bi.set_texcoord(HalfedgeHandle(int(e_idx)), v2f);
|
||||
}
|
||||
break;
|
||||
{
|
||||
_bi.request_face_texcoords2D();
|
||||
}
|
||||
OpenMesh::Vec2f v2f;
|
||||
for (size_t e_idx = 0; e_idx < header_.n_edges_*2; ++e_idx)
|
||||
{
|
||||
bytes_ += vector_restore(_is, v2f, _swap);
|
||||
if (_opt.face_has_texcoord())
|
||||
_bi.set_texcoord(HalfedgeHandle(int(e_idx)), v2f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
case Chunk::Type_Topology:
|
||||
|
||||
@@ -47,12 +47,6 @@
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#if defined(ACGMAKE_STATIC_BUILD)
|
||||
# define OM_STATIC_BUILD 1
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
# define OM_DEBUG
|
||||
#endif
|
||||
|
||||
@@ -593,6 +593,17 @@ class PropertyManager {
|
||||
src.copy_to(src_range, dst, dst_range);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark whether this property should be stored when mesh is written
|
||||
* to a file
|
||||
*
|
||||
* @param _persistence Property will be stored iff _persistence is true
|
||||
*/
|
||||
void set_persistent(bool _persistence = true)
|
||||
{
|
||||
mesh().property(getRawProperty()).set_persistent(_persistence);
|
||||
}
|
||||
|
||||
private:
|
||||
void deleteProperty() {
|
||||
if (!retain_ && prop_.is_valid())
|
||||
|
||||
Reference in New Issue
Block a user