Skip to content
Snippets Groups Projects
Commit e8b03e3a authored by mattijs's avatar mattijs
Browse files

COMP: cvMeshSurfaceSimplify: moved isosurface algo out to ThirdParty

parent cb4a3442
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 25320 deletions
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "${FASTDUALOCTREE_SRC_PATH}" ]
then
wmake
fi
# ----------------------------------------------------------------- end-of-file
...@@ -4,6 +4,7 @@ MarchingCubes/MarchingCubes.cpp ...@@ -4,6 +4,7 @@ MarchingCubes/MarchingCubes.cpp
MarchingCubes/ply.c MarchingCubes/ply.c
*/ */
/*
MarchingCubes = fastdualoctree_sgp MarchingCubes = fastdualoctree_sgp
$(MarchingCubes)/data_access.cpp $(MarchingCubes)/data_access.cpp
...@@ -14,6 +15,7 @@ $(MarchingCubes)/mc_draw.cpp ...@@ -14,6 +15,7 @@ $(MarchingCubes)/mc_draw.cpp
$(MarchingCubes)/morton.cpp $(MarchingCubes)/morton.cpp
$(MarchingCubes)/opt_octree.cpp $(MarchingCubes)/opt_octree.cpp
$(MarchingCubes)/hash_octree.cpp $(MarchingCubes)/hash_octree.cpp
*/
cvMeshSurfaceSimplify.C cvMeshSurfaceSimplify.C
......
...@@ -6,7 +6,7 @@ EXE_INC = \ ...@@ -6,7 +6,7 @@ EXE_INC = \
-DUNIX \ -DUNIX \
-Wno-old-style-cast \ -Wno-old-style-cast \
/* -IMarchingCubes */ \ /* -IMarchingCubes */ \
-I$(MarchingCubes) \ -I$(FASTDUALOCTREE_SRC_PATH) \
-I../conformalVoronoiMesh/lnInclude \ -I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
...@@ -14,6 +14,7 @@ EXE_INC = \ ...@@ -14,6 +14,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
$(CGAL_LIBS) \ $(CGAL_LIBS) \
-L$(FASTDUALOCTREE_SRC_PATH) -lperf_main \
-lGL \ -lGL \
-lconformalVoronoiMesh \ -lconformalVoronoiMesh \
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \ -ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \
......
PROJECT(fastDualOctree)
cmake_minimum_required(VERSION 2.8)
#---------------------------------------------------
#----- Dependencies
#---------------------------------------------------
FIND_PACKAGE(OpenGL REQUIRED)
if ( OPENGL_FOUND )
message( "-- OpenGL found. include=${OPENGL_INCLUDE_DIR}" )
include_directories( ${OPENGL_INCLUDE_DIR} )
endif ( OPENGL_FOUND )
FIND_PACKAGE(ZLIB REQUIRED)
if ( ZLIB_FOUND )
message( "-- zlib found. include=${ZLIB_INCLUDE_DIR}" )
include_directories( ${ZLIB_INCLUDE_DIR} )
endif ( ZLIB_FOUND )
FIND_PACKAGE(PNG REQUIRED)
if ( PNG_FOUND )
message( "-- PNG found. include=${PNG_INCLUDE_DIR}" )
include_directories( ${PNG_INCLUDE_DIR} )
endif ( PNG_FOUND )
##-- GLUI dependency
#FIND_PATH(GLUI_INCLUDE_DIR GL/glui.h ~/pub/system/glui-2.36/src/include)
#FIND_LIBRARY(GLUI_LIBRARIES
# NAMES GLUI glui
# GLUT glut
# PATHS /usr/local/lib/
# /usr/lib/
# /opt/graphics/OpenGL/lib
# /usr/openwin/lib
# /usr/shlib
# /usr/X11R6/lib
# ~/pub/system/glui-2.36/src/lib
# )
#if ( GLUI_INCLUDE_DIR )
# message( "-- GL/glui.h found. include=${GLUI_INCLUDE_DIR}" )
# include_directories( ${GLUI_INCLUDE_DIR} )
#else ( GLUI_INCLUDE_DIR )
# message( "-- GL/glui.h not found." )
#endif ( GLUI_INCLUDE_DIR )
#if ( GLUI_LIBRARIES )
# message( "-- libglui found. include=${GLUI_LIBRARIES}" )
#else( GLUI_LIBRARIES )
# message( "-- libglui not found." )
#endif ( GLUI_LIBRARIES )
#---------------------------------------------------
# -- Environement variables
#---------------------------------------------------
if (UNIX)
add_definitions(-DUNIX)
endif (UNIX)
if (WIN32)
add_definitions(-DWIN32)
endif (WIN32)
if (APPLE)
add_definitions(-DAPPLE)
endif (APPLE)
#---------------------------------------------------
# -- SRCs
#---------------------------------------------------
SET(Perf_SRC ${Perf_SRC}
data_access.cpp
hash_octree.cpp
mc_draw.cpp
opt_octree.cpp
fparser.cpp
leaf_octree.cpp
mem_octree.cpp
fpoptimizer.cpp
MarchingCubes.cpp
morton.cpp
ptr_octree.cpp
)
#SET(VIZ_SRC ${VIZ_SRC}
# viz_glui_cmdline.cpp
# viz_glui_controls.cpp
# viz_glui_draws.cpp
# viz_glui_export.cpp
# viz_glui_mouse.cpp
#)
add_executable(perf_main perf_main ${Perf_SRC})
target_link_libraries(perf_main ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES})
#add_executable(viz_glui_main viz_glui_main ${Perf_SRC} ${VIZ_SRC} )
#target_link_libraries(viz_glui_main ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${GLUI_LIBRARIES})
Statistical optimization of octree searches
Fast generation of pointerless octree duals
---------------------------------------------------
Rener Castro, Thomas Lewiner, HŽlio Lopes, Geovan Tavares, Alex Bordignon
Thomas Lewiner, Vin’cius Mello, Adelailson Peixoto, SinŽsio Pesco, HŽlio Lopes
http://www.matmidia.mat.puc-rio.br/tomlew/publication_page.php?pubkey=octree_cgf
http://www.matmidia.mat.puc-rio.br/tomlew/publication_page.php?pubkey=fastdualoctree_sgp
1. Disclaimer
2. Available code compared to the papers
3. Octrees implementations
4. Morton codes
5. Data
6. Hash table
7. Requirements
Disclaimer
--------------
This code is implements fast searches and the dual generation of static
or dynamic pointer-based or pointerless octrees. It is provided "as is"
and can be used freely. We just ask the users who would use this code to
mention in their academic paper, patent or software documentation the
original articles:
@article{octree_cgf,
author = {Rener Castro and Thomas Lewiner and HŽlio Lopes and Geovan Tavares and Alex Bordignon},
title = {Statistical optimization of octree searches},
year = {2008},
month = {march},
journal = {Computer Graphics Forum},
volume = {27},
number = {6},
pages = {1557--1566},
publisher = {Eurographics},
doi = {10.1111/j.1467-8659.2007.01104.x},
url = {\url{http://www.matmidia.mat.puc-rio.br/tomlew/pdfs/octree_cgf.pdf}}
}
@article{fastdualoctree_sgp,
author = {Thomas Lewiner and Vin’cius Mello and Adelailson Peixoto and SinŽsio Pesco and HŽlio Lopes},
title = {Fast Generation of Pointerless Octree Duals},
year = {2010},
month = {july},
journal = {Symposium on Geometry Processing 2010},
booktitle = {Computer Graphics Forum},
volume = {29},
number = {5},
pages = {1661--1669},
publisher = {Wiley},
address = {Lyon, France},
url = {\url{http://www.matmidia.mat.puc-rio.br/tomlew/pdfs/fastdualoctree_sgp.pdf}}
}
If you have any comment, correction, question, please feel free to
contact me at : lewiner@gmail.com .
Thank to David Coeurjolly for the code porting to UNIX.
Available code compared to the paper
----------------------------------------------
The code contains simple implementations used to generate the result of
our papers. We stripped down the time measurements (which are platform
specific) and the robust dual marching cubes
(http://www.matmidia.mat.puc-rio.br/tomlew/publication_page.php?pubkey=adaptive_implicit_sibgrapi)
code.
Octrees implementations
------------------------------
The code contains implementations of a pointer-based octree
("ptr_octree.*" files), pointerless octrees with recursive dual
generation ("hash_octree.*"), pointerless octrees with optimized dual
generation for the static strategy representing all the nodes
("opt_octree.*") or only the leaves ("leaf_octree.*"), and the dynamic
strategy ("mem_octree.*"). The octree is chosen at compilation time
through the OCTREE_SWITCH macro.
Morton codes
-----------------
The Morton code operations in dilated integers are all grouped in the
"morton.*" files.
Data
------
The data (implicit function or isogrid) is accessed through the
data_access class. The isogrid must be in "iso" format, i.e. a binary
file with 32-bits integers nx, ny and nz for the size of the grid,
32-bits floats xmin, xmax, yminÉ for the geometry of the cube, followed
by nx.ny.nz 32-bits floats for the data.
Hash table
-------------
Finally, we made a very simple naive and simple implementations for the
hashtable, in open ("hash_ptr.h") or close ("has_noptr.h") modes. The
parameters of the hash function are chosen at compilation time through
macros defined in the "hash.h" file.
Requirements
------------
The graphical interfaces require the openGL libraries with the GLU, glut
and glui extension, available at http://glui.sourceforge.net/ .
We use Juha Nieminen, Joel Yliluoma's function parser for the implicit
function, and our Marching Cube's implementation
(http://www.matmidia.mat.puc-rio.br/tomlew/publication_page.php?pubkey=marching_cubes_jgt).
Thank you for your interest, and have fun!
http://www.matmidia.mat.puc-rio.br/tomlew/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment