Commit f4fc97b6 authored by Pierre-Alexandre Beaufort's avatar Pierre-Alexandre Beaufort
Browse files

Merge branch 'vtk-feature-entities' into 'v2.1rc2'

Reader for tetrahedral vtk mesh with feature entities

See merge request !83
parents 5c91f971 fca7ec38
Pipeline #18961 failed with stage
in 3 minutes and 15 seconds
......@@ -20,8 +20,8 @@ if (DOXYGEN_FOUND)
"${CMAKE_CURRENT_SOURCE_DIR}/../src/Unittests"
)
if (${ACG_PROJECT_DATADIR})
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc")
if (${VCI_PROJECT_DATADIR})
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build/${VCI_PROJECT_DATADIR}/Doc")
else()
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build/share/doc/OpenVolumeMesh")
endif()
......
......@@ -58,7 +58,7 @@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/html/logo_vci.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@ACG_PROJECT_DATADIR@/Doc
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@VCI_PROJECT_DATADIR@/Doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
......@@ -1117,7 +1117,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/html/acg_header.html
HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/html/vci_header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
......@@ -1127,7 +1127,7 @@ HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/html/acg_header.html
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/html/acg_footer.html
HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/html/vci_footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
......
......@@ -8,8 +8,10 @@ endif()
# Add target for first example
add_executable(simple_mesh simple_mesh/simple_mesh.cc)
add_executable(read_vtk vtk_datafile_2/read_vtk.cc)
target_link_libraries(simple_mesh OpenVolumeMesh::OpenVolumeMesh)
target_link_libraries(read_vtk OpenVolumeMesh::OpenVolumeMesh)
set_target_properties (simple_mesh PROPERTIES
CXX_STANDARD ${OVM_CXX_STANDARD}
......@@ -17,6 +19,13 @@ set_target_properties (simple_mesh PROPERTIES
CXX_EXTENSIONS NO
)
set_target_properties (read_vtk PROPERTIES
CXX_STANDARD ${OVM_CXX_STANDARD}
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
#[[=
if(WIN32)
# copy exe file to "Build" directory
......
// C++ includes
#include <iostream>
#include <vector>
// Include VtkColorReader class
#include <OpenVolumeMesh/FileManager/VtkColorReader.hh>
// Include vector classes
#include <OpenVolumeMesh/Geometry/VectorT.hh>
// Include polyhedral mesh kernel
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
// Make some typedefs to facilitate your life
typedef OpenVolumeMesh::Geometry::Vec3f Vec3f;
typedef OpenVolumeMesh::GeometryKernel<Vec3f> PolyhedralMeshV3f;
template<class IteratorT>
void stateProperties(const IteratorT& _begin, const IteratorT& _end) {
for (IteratorT p_it = _begin; p_it != _end; ++p_it) {
auto _it = *p_it;
if (!_it->persistent()) {
std::cout << "N O T \t P E R S I S T E N T \t ? !" << std::endl;
continue;
}
if (_it->anonymous()) std::cout << "A N O N Y M O U S \t ? !" << std::endl;
std::cout << _it->entityType() << " " << _it->typeNameWrapper() << " " << _it->name() << std::endl;
_it->serialize(std::cout);
}
}
int main (int argc, char* argv[]) {
OpenVolumeMesh::Reader::VtkColorReader vtk;
OpenVolumeMesh::GeometricPolyhedralMeshV3d mesh;
vtk.readFile("../examples/vtk_datafile_2/vtk_files/s01c_cube.vtk", mesh, true, true);
std::cout << mesh.n_vertices() << " vertices" << std::endl;
std::cout << mesh.n_cells() << " tetrahedra" << std::endl;
//stateProperties(mesh.vertex_props_begin(), mesh.vertex_props_end());
//stateProperties(mesh.edge_props_begin(), mesh.edge_props_end());
//stateProperties(mesh.face_props_begin(), mesh.face_props_end());
//stateProperties(mesh.cell_props_begin(), mesh.cell_props_end());
return 0;
}
This diff is collapsed.
......@@ -34,17 +34,17 @@ configure_file (
)
# If we are in a subdirectory of another project that has a ACGCommon module
# (e.g. OpenFlipper), we will use acg_add_library; otherwise behave "normally".
include(ACGCommon OPTIONAL RESULT_VARIABLE IN_ACG_BUILD)
if(IN_ACG_BUILD)
message("OVM is being built as part of an ACG project, using acg_add_library!")
# If we are in a subdirectory of another project that has a VCICommon module
# (e.g. OpenFlipper), we will use vci_add_library; otherwise behave "normally".
include(VCICommon OPTIONAL RESULT_VARIABLE IN_VCI_BUILD)
if(IN_VCI_BUILD)
message("OVM is being built as part of an VCI project, using vci_add_library!")
if (WIN32 OR EMSCRIPTEN)
acg_add_library(OpenVolumeMesh STATIC ${SOURCE_FILES})
vci_add_library(OpenVolumeMesh STATIC ${SOURCE_FILES})
else()
acg_add_library(OpenVolumeMesh SHARED ${SOURCE_FILES})
vci_add_library(OpenVolumeMesh SHARED ${SOURCE_FILES})
endif()
else(IN_ACG_BUILD)
else(IN_VCI_BUILD)
if (WIN32)
# Windows .dll build is not supported yet.
# TODO: turn this on once we have OVM_EXPORT macros in all required places,
......@@ -54,7 +54,7 @@ else(IN_ACG_BUILD)
option(BUILD_SHARED_LIBS "Build shared library (*.dll, *.so, *.dylib) instead of static library (*.a, *.lib)" ON)
add_library(OpenVolumeMesh ${SOURCE_FILES})
endif()
endif(IN_ACG_BUILD)
endif(IN_VCI_BUILD)
add_library(OpenVolumeMesh::OpenVolumeMesh ALIAS OpenVolumeMesh)
......
This diff is collapsed.
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