Skip to content

Commit

Permalink
[geogram] Update to 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
simogasp committed Dec 30, 2019
1 parent 5fe142b commit 7c3a24d
Show file tree
Hide file tree
Showing 117 changed files with 74,505 additions and 9,673 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ include(cmake/geogram.cmake)

set(VORPALINE_VERSION_MAJOR 1)
set(VORPALINE_VERSION_MINOR 7)
set(VORPALINE_VERSION_PATCH 2)
set(VORPALINE_VERSION_PATCH 3)
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})

set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
Expand Down
4 changes: 2 additions & 2 deletions cmake/platforms/Linux-gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ add_flags(CMAKE_CXX_FLAGS -frounding-math -ffp-contract=off)
add_flags(CMAKE_C_FLAGS -frounding-math -ffp-contract=off)

# Activate AVX2 instruction set
#add_flags(CMAKE_CXX_FLAGS -mavx2)
#add_flags(CMAKE_C_FLAGS -mavx2)
# add_flags(CMAKE_CXX_FLAGS -mavx2)
# add_flags(CMAKE_C_FLAGS -mavx2)

# Activate c++ 2011
add_flags(CMAKE_CXX_FLAGS -std=c++11)
Expand Down
2 changes: 1 addition & 1 deletion src/bin/fpg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include_directories(.)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")
2 changes: 1 addition & 1 deletion src/bin/geobox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ add_executable(geobox ${SOURCES})
target_link_libraries(geobox geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(geobox)

set_target_properties(geobox PROPERTIES FOLDER "GEOGRAM")
set_target_properties(geobox PROPERTIES FOLDER "GEOGRAM/Programs")
2 changes: 1 addition & 1 deletion src/bin/geocod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")
2 changes: 1 addition & 1 deletion src/bin/geocod/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ namespace {
void draw_viewer_properties() override {
if(ImGui::Button(
"run",
ImVec2(-ImGui::GetContentRegionAvailWidth()/2.0f,0.0f))
ImVec2(-ImGui::GetContentRegionAvail().x/2.0f,0.0f))
) {
run_program();
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/geodump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")

2 changes: 1 addition & 1 deletion src/bin/geoshade/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")
2 changes: 1 addition & 1 deletion src/bin/geoshade/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ namespace {
void draw_viewer_properties() override {
if(ImGui::Button(
(icon_UTF8("play-circle")+" run").c_str(),
ImVec2(-ImGui::GetContentRegionAvailWidth()/1.8f,0.0f))
ImVec2(-ImGui::GetContentRegionAvail().x/1.8f,0.0f))
) {
run_program();
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/vorpacomp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")

2 changes: 1 addition & 1 deletion src/bin/vorpalite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target_link_libraries(${APP_NAME} geogram)

install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")



2 changes: 1 addition & 1 deletion src/bin/vorpastat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")

2 changes: 1 addition & 1 deletion src/bin/vorpaview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Programs")
2 changes: 1 addition & 1 deletion src/examples/exploragram/compute_OTM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ else()
target_link_libraries(${APP_NAME} exploragram geogram)
endif()

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/exploragram/hexdom_pipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} exploragram geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")


2 changes: 1 addition & 1 deletion src/examples/geogram/compute_RVD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")


2 changes: 1 addition & 1 deletion src/examples/geogram/compute_delaunay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/geogram/manifold_harmonics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/geogram/opennl_LSCM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/geogram/opennl_basic_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")


2 changes: 1 addition & 1 deletion src/examples/geogram/opennl_mesh_smooth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/geogram/simple_raytrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ aux_source_directories(SOURCES "" .)
vor_add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram)

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_Application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_Delaunay2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_Delaunay3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
41 changes: 28 additions & 13 deletions src/examples/graphics/demo_Delaunay3d/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace {
if(
ImGui::Button(
"+",
ImVec2(-ImGui::GetContentRegionAvailWidth()/2.0f,0.0f)
ImVec2(-ImGui::GetContentRegionAvail().x/2.0f,0.0f)
) && nb_points_ < 10000
) {
++nb_points_;
Expand Down Expand Up @@ -156,13 +156,23 @@ namespace {
ImGui::Spacing();

ImGui::Checkbox("Box", &draw_box_);
ImGui::Checkbox("Period 3x3x3", &draw_period_);
if(ImGui::Checkbox("Period 3x3x3", &draw_period_)) {
if(draw_period_) {
set_region_of_interest(
-1.0, -1.0, -1.0, 2.0, 2.0, 2.0
);
} else {
set_region_of_interest(
0.0, 0.0, 0.0, 1.0, 1.0, 1.0
);
}
}
ImGui::Checkbox("Points", &draw_points_);
ImGui::SameLine();
ImGui::SliderFloat("##PtSz.", &point_size_, 1.0f, 50.0f, "%.1f");
ImGui::Checkbox("Cells", &draw_cells_);
ImGui::SameLine();
ImGui::SliderFloat("##Shrk.", &cells_shrink_, 0.0f, 1.0f, "%.2f");
ImGui::SliderFloat("##Shrk.", &cells_shrink_, 0.0f, 1.0f, "%.2f");
}

/**
Expand All @@ -186,13 +196,14 @@ namespace {

/**
* \brief Draws a cell.
* \details Needs to be called between glupBegin(GLUP_TRIANGLES) and glupEnd().
* \details Needs to be called between glupBegin(GLUP_TRIANGLES)
* and glupEnd().
*/
void draw_cell(ConvexCell& C, index_t instance = 0) {
double s = double(cells_shrink_);
double Tx = double(Periodic::translation[instance][0]);
double Ty = double(Periodic::translation[instance][1]);
double Tz = double(Periodic::translation[instance][2]);
double Tz = double(Periodic::translation[instance][2]);

vec3 g;
if(cells_shrink_ != 0.0f) {
Expand Down Expand Up @@ -223,15 +234,17 @@ namespace {
if(n == 0) {
P[0] = C.triangle_point(VBW::ushort(t));
} else if(n == 1) {
P[1] = C.triangle_point(VBW::ushort(t));
P[1] = C.triangle_point(VBW::ushort(t));
} else {
P[2] = C.triangle_point(VBW::ushort(t));
if(s == 0.0) {
for(index_t i=0; i<3; ++i) {
glupPrivateVertex3d(P[i].x + Tx, P[i].y + Ty, P[i].z + Tz);
glupPrivateVertex3d(
P[i].x + Tx, P[i].y + Ty, P[i].z + Tz
);
}
} else {
for(index_t i=0; i<3; ++i) {
for(index_t i=0; i<3; ++i) {
glupPrivateVertex3d(
s*g.x + (1.0-s)*P[i].x + Tx,
s*g.y + (1.0-s)*P[i].y + Ty,
Expand Down Expand Up @@ -281,7 +294,7 @@ namespace {
glupTranslated(
double(Periodic::translation[i][0]),
double(Periodic::translation[i][1]),
double(Periodic::translation[i][2])
double(Periodic::translation[i][2])
);

glupBegin(GLUP_SPHERES);
Expand All @@ -298,7 +311,7 @@ namespace {
glupTranslated(
-double(Periodic::translation[i][0]),
-double(Periodic::translation[i][1]),
-double(Periodic::translation[i][2])
-double(Periodic::translation[i][2])
);
}

Expand Down Expand Up @@ -335,15 +348,17 @@ namespace {

glupEnable(GLUP_DRAW_MESH);
glupEnable(GLUP_ALPHA_DISCARD);
glupSetColor4f(GLUP_FRONT_AND_BACK_COLOR, 1.0f, 1.0f, 1.0f, 0.0f);
glupSetColor4f(
GLUP_FRONT_AND_BACK_COLOR, 1.0f, 1.0f, 1.0f, 0.0f
);
glupSetMeshWidth(10);
glupDisable(GLUP_LIGHTING);

for(index_t i=0; i<max_instance; ++i) {
glupTranslated(
double(Periodic::translation[i][0]),
double(Periodic::translation[i][1]),
double(Periodic::translation[i][2])
double(Periodic::translation[i][2])
);

glupBegin(GLUP_QUADS);
Expand Down Expand Up @@ -383,7 +398,7 @@ namespace {
glupTranslated(
-double(Periodic::translation[i][0]),
-double(Periodic::translation[i][1]),
-double(Periodic::translation[i][2])
-double(Periodic::translation[i][2])
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_Evert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_GLUP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
2 changes: 1 addition & 1 deletion src/examples/graphics/demo_Raytrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
4 changes: 2 additions & 2 deletions src/examples/graphics/demo_SimpleApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include(${PROJECT_SOURCE_DIR}/cmake/opengl.cmake)
set(APP_NAME geogram_demo_SimpleApplication)
set(APP_NAME geogram_demo_SimpleApp)

aux_source_directories(SOURCES "" .)
add_executable(${APP_NAME} ${SOURCES})
target_link_libraries(${APP_NAME} geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(${APP_NAME})

set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM")
set_target_properties(${APP_NAME} PROPERTIES FOLDER "GEOGRAM/Examples")
Loading

0 comments on commit 7c3a24d

Please sign in to comment.