diff --git a/.gitignore b/.gitignore index 620d3dc..557a3a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.slo *.lo *.o +*.obj # Compiled Dynamic libraries *.so @@ -11,3 +12,10 @@ *.lai *.la *.a + +# Visual Studio project files +*.VC.db +*.vcxproj.user + +# the whole build folder +x64/* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index ccb45c5..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -#================================================================================ -# Fluid Dynamics Engine CMake file -#================================================================================ - -cmake_minimum_required( VERSION 2.6 ) -project( FDL ) -set( CMAKE_BUILD_TYPE Debug) -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/bin) -set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib) - -include( CMakeForceCompiler ) -cmake_force_cxx_compiler (g++ clang++ Clang++) - -# include( cmake/modules/FindOpenCL.cmake ) -set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/) -set( FDL_BUILD_TESTS OFF CACHE BOOL "Build tests") -set( FDL_BUILD_DOCS ON CACHE BOOL "Build documentation") - -# add_subdirectory( lib ) -add_subdirectory( src ) -if(FDL_BUILD_TESTS) - add_subdirectory( tests ) - add_subdirectory( tests/io_logger ) - add_subdirectory( tests/openCL ) - add_subdirectory( tests/ublas ) -endif(FDL_BUILD_TESTS) - -add_custom_target( tests DEPENDS xml_handling threads windowing ocl_test pcg_test io_logger ) -# add_custom_target( stuff DEPENDS FDL ) - -# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory. -if(FDL_BUILD_DOCS) - set( "DOXYFILE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src " - "DOXYFILE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/include " ) - set( DOXYFILE_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/docs ) - set( DOXYFILE_LATEX "NO" ) - include( UseDoxygen ) -endif(FDL_BUILD_DOCS) - -# -# DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are. -# Defaults to the current source and binary directory. -# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. Defaults to "doc". -# -# DOXYFILE_LATEX - Set to "NO" if you do not want the LaTeX documentation -# to be built. -# DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen LaTeX output is stored. Defaults to "latex". -# -# DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen html output is stored. Defaults to "html". -# - diff --git a/cmake/modules/FindEigen3.cmake b/cmake/modules/FindEigen3.cmake deleted file mode 100644 index 9c546a0..0000000 --- a/cmake/modules/FindEigen3.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# - Try to find Eigen3 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen3 3.1.2) -# to require version 3.1.2 or newer of Eigen3. -# -# Once done this will define -# -# EIGEN3_FOUND - system has eigen lib with correct version -# EIGEN3_INCLUDE_DIR - the eigen include directory -# EIGEN3_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -if(NOT Eigen3_FIND_VERSION) - if(NOT Eigen3_FIND_VERSION_MAJOR) - set(Eigen3_FIND_VERSION_MAJOR 2) - endif(NOT Eigen3_FIND_VERSION_MAJOR) - if(NOT Eigen3_FIND_VERSION_MINOR) - set(Eigen3_FIND_VERSION_MINOR 91) - endif(NOT Eigen3_FIND_VERSION_MINOR) - if(NOT Eigen3_FIND_VERSION_PATCH) - set(Eigen3_FIND_VERSION_PATCH 0) - endif(NOT Eigen3_FIND_VERSION_PATCH) - - set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") -endif(NOT Eigen3_FIND_VERSION) - -macro(_eigen3_check_version) - file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) - - string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") - set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") - set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") - set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) - if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK FALSE) - else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK TRUE) - endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - - if(NOT EIGEN3_VERSION_OK) - - message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " - "but at least version ${Eigen3_FIND_VERSION} is required") - endif(NOT EIGEN3_VERSION_OK) -endmacro(_eigen3_check_version) - -if (EIGEN3_INCLUDE_DIR) - - # in cache already - _eigen3_check_version() - set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) - -else (EIGEN3_INCLUDE_DIR) - - find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library - PATHS - ${CMAKE_INSTALL_PREFIX}/include - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen - ) - - if(EIGEN3_INCLUDE_DIR) - _eigen3_check_version() - endif(EIGEN3_INCLUDE_DIR) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) - - mark_as_advanced(EIGEN3_INCLUDE_DIR) - -endif(EIGEN3_INCLUDE_DIR) - diff --git a/cmake/modules/FindGSL.cmake b/cmake/modules/FindGSL.cmake deleted file mode 100644 index bf411a7..0000000 --- a/cmake/modules/FindGSL.cmake +++ /dev/null @@ -1,170 +0,0 @@ -# Try to find gnu scientific library GSL -# See -# http://www.gnu.org/software/gsl/ and -# http://gnuwin32.sourceforge.net/packages/gsl.htm -# -# Once run this will define: -# -# GSL_FOUND = system has GSL lib -# -# GSL_LIBRARIES = full path to the libraries -# on Unix/Linux with additional linker flags from "gsl-config --libs" -# -# CMAKE_GSL_CXX_FLAGS = Unix compiler flags for GSL, essentially "`gsl-config --cxxflags`" -# -# GSL_INCLUDE_DIR = where to find headers -# -# GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix -# GSL_EXE_LINKER_FLAGS = rpath on Unix -# -# Felix Woelk 07/2004 -# Jan Woetzel -# -# www.mip.informatik.uni-kiel.de -# -------------------------------- - -IF(WIN32) - # JW tested with gsl-1.8, Windows XP, MSVS 7.1 - SET(GSL_POSSIBLE_ROOT_DIRS - ${GSL_ROOT_DIR} - $ENV{GSL_ROOT_DIR} - ${GSL_DIR} - ${GSL_HOME} - $ENV{GSL_DIR} - $ENV{GSL_HOME} - $ENV{EXTRA} - "C:/Program Files/GnuWin32" - ) - FIND_PATH(GSL_INCLUDE_DIR - NAMES gsl/gsl_cdf.h gsl/gsl_randist.h - PATHS ${GSL_POSSIBLE_ROOT_DIRS} - PATH_SUFFIXES include - DOC "GSL header include dir" - ) - - FIND_LIBRARY(GSL_GSL_LIBRARY - NAMES libgsl.dll.a gsl libgsl - PATHS ${GSL_POSSIBLE_ROOT_DIRS} - PATH_SUFFIXES lib - DOC "GSL library" ) - - if(NOT GSL_GSL_LIBRARY) - FIND_FILE(GSL_GSL_LIBRARY - NAMES libgsl.dll.a - PATHS ${GSL_POSSIBLE_ROOT_DIRS} - PATH_SUFFIXES lib - DOC "GSL library") - endif(NOT GSL_GSL_LIBRARY) - - FIND_LIBRARY(GSL_GSLCBLAS_LIBRARY - NAMES libgslcblas.dll.a gslcblas libgslcblas - PATHS ${GSL_POSSIBLE_ROOT_DIRS} - PATH_SUFFIXES lib - DOC "GSL cblas library dir" ) - - if(NOT GSL_GSLCBLAS_LIBRARY) - FIND_FILE(GSL_GSLCBLAS_LIBRARY - NAMES libgslcblas.dll.a - PATHS ${GSL_POSSIBLE_ROOT_DIRS} - PATH_SUFFIXES lib - DOC "GSL library") - endif(NOT GSL_GSLCBLAS_LIBRARY) - - SET(GSL_LIBRARIES ${GSL_GSL_LIBRARY}) - - #MESSAGE("DBG\n" - # "GSL_GSL_LIBRARY=${GSL_GSL_LIBRARY}\n" - # "GSL_GSLCBLAS_LIBRARY=${GSL_GSLCBLAS_LIBRARY}\n" - # "GSL_LIBRARIES=${GSL_LIBRARIES}") - - -ELSE(WIN32) - - IF(UNIX) - SET(GSL_CONFIG_PREFER_PATH - "$ENV{GSL_DIR}/bin" - "$ENV{GSL_DIR}" - "$ENV{GSL_HOME}/bin" - "$ENV{GSL_HOME}" - CACHE STRING "preferred path to GSL (gsl-config)") - FIND_PROGRAM(GSL_CONFIG gsl-config - ${GSL_CONFIG_PREFER_PATH} - /usr/bin/ - ) - # MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}") - - IF (GSL_CONFIG) - # set CXXFLAGS to be fed into CXX_FLAGS by the user: - SET(GSL_CXX_FLAGS "`${GSL_CONFIG} --cflags`") - - # set INCLUDE_DIRS to prefix+include - EXEC_PROGRAM(${GSL_CONFIG} - ARGS --prefix - OUTPUT_VARIABLE GSL_PREFIX) - SET(GSL_INCLUDE_DIR ${GSL_PREFIX}/include CACHE STRING INTERNAL) - - # set link libraries and link flags - #SET(GSL_LIBRARIES "`${GSL_CONFIG} --libs`") - EXEC_PROGRAM(${GSL_CONFIG} - ARGS --libs - OUTPUT_VARIABLE GSL_LIBRARIES ) - - # extract link dirs for rpath - EXEC_PROGRAM(${GSL_CONFIG} - ARGS --libs - OUTPUT_VARIABLE GSL_CONFIG_LIBS ) - - # extract version - EXEC_PROGRAM(${GSL_CONFIG} - ARGS --version - OUTPUT_VARIABLE GSL_FULL_VERSION ) - - # split version as major/minor - STRING(REGEX MATCH "(.)\\..*" GSL_VERSION_MAJOR_ "${GSL_FULL_VERSION}") - SET(GSL_VERSION_MAJOR ${CMAKE_MATCH_1}) - STRING(REGEX MATCH ".\\.(.*)" GSL_VERSION_MINOR_ "${GSL_FULL_VERSION}") - SET(GSL_VERSION_MINOR ${CMAKE_MATCH_1}) - - # split off the link dirs (for rpath) - # use regular expression to match wildcard equivalent "-L*" - # with is a space or a semicolon - STRING(REGEX MATCHALL "[-][L]([^ ;])+" - GSL_LINK_DIRECTORIES_WITH_PREFIX - "${GSL_CONFIG_LIBS}" ) - # MESSAGE("DBG GSL_LINK_DIRECTORIES_WITH_PREFIX=${GSL_LINK_DIRECTORIES_WITH_PREFIX}") - - # remove prefix -L because we need the pure directory for LINK_DIRECTORIES - - IF (GSL_LINK_DIRECTORIES_WITH_PREFIX) - STRING(REGEX REPLACE "[-][L]" "" GSL_LINK_DIRECTORIES ${GSL_LINK_DIRECTORIES_WITH_PREFIX} ) - ENDIF (GSL_LINK_DIRECTORIES_WITH_PREFIX) - SET(GSL_EXE_LINKER_FLAGS "-Wl,-rpath,${GSL_LINK_DIRECTORIES}" CACHE STRING INTERNAL) - # MESSAGE("DBG GSL_LINK_DIRECTORIES=${GSL_LINK_DIRECTORIES}") - # MESSAGE("DBG GSL_EXE_LINKER_FLAGS=${GSL_EXE_LINKER_FLAGS}") - - # ADD_DEFINITIONS("-DHAVE_GSL") - # SET(GSL_DEFINITIONS "-DHAVE_GSL") - MARK_AS_ADVANCED( - GSL_CXX_FLAGS - GSL_INCLUDE_DIR - GSL_LIBRARIES - GSL_LINK_DIRECTORIES - GSL_DEFINITIONS - ) - MESSAGE(STATUS "Using GSL from ${GSL_PREFIX}") - - ELSE(GSL_CONFIG) - MESSAGE("FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=${GSL_CONFIG}") - ENDIF(GSL_CONFIG) - - ENDIF(UNIX) -ENDIF(WIN32) - - -IF(GSL_LIBRARIES) - IF(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS) - - SET(GSL_FOUND 1) - - ENDIF(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS) -ENDIF(GSL_LIBRARIES) diff --git a/cmake/modules/FindOpenCL.cmake b/cmake/modules/FindOpenCL.cmake deleted file mode 100644 index d384b38..0000000 --- a/cmake/modules/FindOpenCL.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# - Try to find OpenCL -# Once done this will define -# -# OPENCL_FOUND - system has OpenCL -# OPENCL_INCLUDE_DIR - the OpenCL include directory -# OPENCL_LIBRARIES - link these to use OpenCL -# -# WIN32 should work, but is untested - -IF (WIN32) - - FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.h ) - - # TODO this is only a hack assuming the 64 bit library will - # not be found on 32 bit system - FIND_LIBRARY(OPENCL_LIBRARIES opencl64 ) - IF( OPENCL_LIBRARIES ) - FIND_LIBRARY(OPENCL_LIBRARIES opencl32 ) - ENDIF( OPENCL_LIBRARIES ) - -ELSE (WIN32) - - # Unix style platforms - # We also search for OpenCL in the NVIDIA SDK default location - FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.h /Developer/GPU Computing/OpenCL/common/inc/ ) - FIND_LIBRARY(OPENCL_LIBRARIES OpenCL - ENV LD_LIBRARY_PATH - ) - -ENDIF (WIN32) - -SET( OPENCL_FOUND "NO" ) -IF(OPENCL_LIBRARIES ) - SET( OPENCL_FOUND "YES" ) -ENDIF(OPENCL_LIBRARIES) - -MARK_AS_ADVANCED( - OPENCL_INCLUDE_DIR -) \ No newline at end of file diff --git a/cmake/modules/UseDoxygen.cmake b/cmake/modules/UseDoxygen.cmake deleted file mode 100644 index f521b6a..0000000 --- a/cmake/modules/UseDoxygen.cmake +++ /dev/null @@ -1,121 +0,0 @@ -# - Run Doxygen -# -# Adds a doxygen target that runs doxygen to generate the html -# and optionally the LaTeX API documentation. -# The doxygen target is added to the doc target as a dependency. -# i.e.: the API documentation is built with: -# make doc -# -# USAGE: GLOBAL INSTALL -# -# Install it with: -# cmake ./ && sudo make install -# Add the following to the CMakeLists.txt of your project: -# include(UseDoxygen OPTIONAL) -# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it. -# -# USAGE: INCLUDE IN PROJECT -# -# set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -# include(UseDoxygen) -# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory. -# -# -# Variables you may define are: -# DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are. -# Defaults to the current source and binary directory. -# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. Defaults to "doc". -# -# DOXYFILE_LATEX - Set to "NO" if you do not want the LaTeX documentation -# to be built. -# DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen LaTeX output is stored. Defaults to "latex". -# -# DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where -# the Doxygen html output is stored. Defaults to "html". -# - -# -# Copyright (c) 2009, 2010 Tobias Rautenkranz -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -macro(usedoxygen_set_default name value) - if(NOT DEFINED "${name}") - set("${name}" "${value}") - endif() -endmacro() - -find_package(Doxygen) - -if(DOXYGEN_FOUND) - find_file(DOXYFILE_IN "Doxyfile.in" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/" - NO_DEFAULT_PATH) - set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN") -endif() - -if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND) - if(NOT DEFINED DOXYFILE_OUTPUT_DIR) - usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc") - endif() - usedoxygen_set_default(DOXYFILE_HTML_DIR "html") - usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}\" - \"${CMAKE_CURRENT_BINARY_DIR}") - - set_property(DIRECTORY APPEND PROPERTY - ADDITIONAL_MAKE_CLEAN_FILES - "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}") - - add_custom_target(doxygen - COMMAND ${DOXYGEN_EXECUTABLE} - ${DOXYFILE} - COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..." - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - - ## LaTeX - set(DOXYFILE_PDFLATEX "NO") - set(DOXYFILE_DOT "NO") - - find_package(LATEX) - find_program(MAKE_PROGRAM make) - if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND MAKE_PROGRAM AND - (NOT DEFINED DOXYFILE_LATEX OR DOXYFILE_LATEX STREQUAL "YES")) - set(DOXYFILE_LATEX "YES") - usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex") - - set_property(DIRECTORY APPEND PROPERTY - ADDITIONAL_MAKE_CLEAN_FILES - "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}") - - if(PDFLATEX_COMPILER) - set(DOXYFILE_PDFLATEX "YES") - endif() - if(DOXYGEN_DOT_EXECUTABLE) - set(DOXYFILE_DOT "YES") - endif() - - add_custom_command(TARGET doxygen - POST_BUILD - COMMAND ${MAKE_PROGRAM} - COMMENT "Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..." - WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}") - else() - set(DOXYGEN_LATEX "NO") - endif() - - - configure_file(${DOXYFILE_IN} Doxyfile IMMEDIATE @ONLY) - - get_target_property(DOC_TARGET doc TYPE) - if(NOT DOC_TARGET) - add_custom_target(doc) - endif() - - add_dependencies(doc doxygen) -endif() diff --git a/extern/cg/vecmath/vec2.hpp b/extern/cg/vecmath/vec2.hpp index 4dfab79..c25c3ca 100644 --- a/extern/cg/vecmath/vec2.hpp +++ b/extern/cg/vecmath/vec2.hpp @@ -9,7 +9,6 @@ ************************************************************************/ -#include "cg/cg.h" namespace cg { namespace vecmath { diff --git a/include/core/Fdl.h b/include/core/Fdl.h new file mode 100644 index 0000000..2677fae --- /dev/null +++ b/include/core/Fdl.h @@ -0,0 +1,60 @@ +#ifndef __FDL_FDL_H +#define __FDL_FDL_H + +#include +#include +#include + +namespace fdl { + +/* + This is a singleton object. From here you can + access all the FDL functionality +*/ + +class Fdl +{ +public: + static Fdl &Instance(); + ~Fdl(); + + // set the dimensions of the grid + void setGridDimenctions(unsigned x, unsigned y, unsigned z, float dx); + // set the tolerance + void setCGTolerance(float tol); + // set the maximum iterations + void setCGMaxIterations(unsigned it); + // set the time step + void setStep(float step); + + void start(); + void startAsync(); + void stop(); + +protected: + void solverFunc(); + + Grid* m_macGrid; + FluidSolver* m_fluidSolver; + + float m_cgTolerance; + float m_step; + unsigned m_cgMaxIterations; + unsigned m_gridDimensions[3]; + float m_dx; + + bool m_stop; + bool m_isRunning; + + std::thread m_runnerThread; + +private: + Fdl(); + Fdl(const Fdl &); + void operator=(const Fdl &); +}; + +} // namespace fdl + +#endif // FDL_FDL_H + diff --git a/include/core/common.h b/include/core/common.h index d1be186..fc0e52a 100644 --- a/include/core/common.h +++ b/include/core/common.h @@ -22,6 +22,7 @@ #ifndef __FDL_COMMON_H #define __FDL_COMMON_H + #include #include @@ -38,7 +39,7 @@ typedef enum interp_T { LINEAR, RK2, CATMULLROM } interp_T; // typedef enum fileFormat_T { POV_RAY, BLENDER, YAFARAY, PPM, PBRT, PNG } fileFormat_T; const int DIMENSIONS = 3; -const float EPSILON = 1e-5; // use FLT_EPSILON in instead? +const float EPSILON = 1e-5f; // use FLT_EPSILON in instead? const double PI = M_PI; const double E = M_E; diff --git a/include/core/fluidsolver.h b/include/core/fluidsolver.h index 58425bd..7569627 100644 --- a/include/core/fluidsolver.h +++ b/include/core/fluidsolver.h @@ -28,9 +28,9 @@ #include #include -#include "core/common.h" -#include "core/vector.hpp" -#include "core/grid.hpp" +#include +#include +#include namespace fdl { diff --git a/include/core/glutrender.h b/include/core/glutrender.h index 4685b6a..f605b08 100644 --- a/include/core/glutrender.h +++ b/include/core/glutrender.h @@ -10,8 +10,9 @@ #include #elif defined(__APPLE__) #include -#elif defined(__WIN32__) -#include +#elif defined(_WIN32) +#include +#include #endif #include @@ -263,7 +264,7 @@ namespace GlutRender { exit(-1); } - if (setjmp(png_ptr->jmpbuf)) { + if (setjmp(png_jmpbuf(png_ptr))) { std::cerr << "Error: \"" << fname << "\" could not be written!" << std::endl; exit(-1); diff --git a/include/core/grid.hpp b/include/core/grid.hpp index 315c114..5a715b8 100644 --- a/include/core/grid.hpp +++ b/include/core/grid.hpp @@ -29,9 +29,9 @@ #include #include -#include "core/common.h" -#include "core/vector.hpp" -#include "logger/logger.h" +#include +#include +#include namespace fdl { @@ -431,13 +431,12 @@ class TGrid { } // bad behavior... - float* getDensityArray() const + void getDensityArray(std::vector &densityVector) const { - float* _density = (float*)malloc(sizeof(float) * m_numPoints); + densityVector.resize(m_numPoints); for (int i=0; i #include -#include "core/vector.hpp" +#include #define PARTICLE_MASS 1.0; diff --git a/include/core/particlesystem.h b/include/core/particlesystem.h index 6f1dcf7..5e03a2c 100644 --- a/include/core/particlesystem.h +++ b/include/core/particlesystem.h @@ -8,9 +8,9 @@ #include #include -#include "core/vector.hpp" -#include "core/grid.hpp" -#include "core/particle.hpp" +#include +#include +#include namespace fdl { diff --git a/include/io/df3exporter.h b/include/io/df3exporter.h index b9e7c4f..123f562 100644 --- a/include/io/df3exporter.h +++ b/include/io/df3exporter.h @@ -24,9 +24,9 @@ #include -#include "core/grid.hpp" -#include "logger/logger.h" -#include "io/exporterbase.h" +#include +#include +#include namespace fdl { @@ -39,7 +39,7 @@ class Df3Exporter : public ExporterBase { private: virtual void write(); - void exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes); + void exportDensity(int counter, std::string prefix, const std::vector &field, int xRes, int yRes, int zRes); }; } // namespace fdl diff --git a/include/io/exporterbase.h b/include/io/exporterbase.h index 80ce5c9..2250e1d 100644 --- a/include/io/exporterbase.h +++ b/include/io/exporterbase.h @@ -28,11 +28,10 @@ #include #include #include +#include -#include - -#include "core/grid.hpp" -#include "core/common.h" +#include +#include namespace fdl { @@ -47,7 +46,7 @@ class ExporterBase { protected: // boost::thread m_writeThread; - boost::mutex m_writeMutex; + std::mutex m_writeMutex; std::ofstream* m_filestream; std::string m_filenamePrefix; int m_filenameCounter; diff --git a/include/io/importerbase.h b/include/io/importerbase.h index f016534..37249b9 100644 --- a/include/io/importerbase.h +++ b/include/io/importerbase.h @@ -30,14 +30,14 @@ #include #include -#include "core/common.h" +#include namespace fdl { class ImporterBase { public: - virtual void load(const std::string &filename) = 0; - virtual void save(const std::string &filename) = 0; + virtual bool load(const std::string &filename) = 0; + virtual bool save(const std::string &filename) = 0; protected: boost::property_tree::ptree pt; diff --git a/include/io/pbrtexporter.h b/include/io/pbrtexporter.h index 143e05a..431d9a4 100644 --- a/include/io/pbrtexporter.h +++ b/include/io/pbrtexporter.h @@ -24,9 +24,9 @@ #include -#include "core/grid.hpp" -#include "logger/logger.h" -#include "io/exporterbase.h" +#include +#include +#include namespace fdl { @@ -39,7 +39,7 @@ class PbrtExporter : public ExporterBase { private: virtual void write(); - void exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes); + void exportDensity(int counter, std::string prefix, std::vector &field, int xRes, int yRes, int zRes); }; diff --git a/include/io/pngexporter.h b/include/io/pngexporter.h index 29e109b..4600ae8 100644 --- a/include/io/pngexporter.h +++ b/include/io/pngexporter.h @@ -24,9 +24,9 @@ #include -#include "core/grid.hpp" -#include "logger/logger.h" -#include "io/exporterbase.h" +#include +#include +#include namespace fdl { @@ -39,7 +39,7 @@ class PngExporter : public ExporterBase { private: virtual void write(); - void exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes); + void exportDensity(int counter, std::string prefix, const std::vector &field, int xRes, int yRes, int zRes); int writePNG(const char* filename, unsigned char** rowsp, int w, int h); }; diff --git a/include/io/sceneimporter.h b/include/io/sceneimporter.h index 171cebd..03494a0 100644 --- a/include/io/sceneimporter.h +++ b/include/io/sceneimporter.h @@ -26,12 +26,10 @@ #include #include #include +#include -#include -#include - -#include "core/common.h" -#include "io/importerbase.h" +#include +#include namespace fdl { @@ -39,8 +37,12 @@ class SceneImporter : public ImporterBase { public: SceneImporter(); ~SceneImporter(); - virtual void load(const std::string &filename); - virtual void save(const std::string &filename); + virtual bool load(const std::string &filename); + virtual bool save(const std::string &filename); + +protected: + std::string m_file; + int m_level; }; } // namespace fdl diff --git a/include/logger/logwriter.h b/include/logger/logwriter.h index 6cdc5cd..f042cf2 100644 --- a/include/logger/logwriter.h +++ b/include/logger/logwriter.h @@ -24,7 +24,7 @@ #define __FDL_LogWriter_H #include -#include "logger/logger.h" +#include namespace fdl { diff --git a/include/logger/stdiowriter.h b/include/logger/stdiowriter.h index d0e429b..dff4be4 100644 --- a/include/logger/stdiowriter.h +++ b/include/logger/stdiowriter.h @@ -23,11 +23,9 @@ #ifndef __FDL_StdOutWriter_H #define __FDL_StdOutWriter_H -#include "logger/logwriter.h" +#include -namespace boost { - class mutex; -} +#include namespace fdl { @@ -41,7 +39,7 @@ class StdOutWriter : public LogWriter { void setFormat(const char* newFormat); private: - static boost::mutex m_coutMutex; + static std::mutex m_coutMutex; const char* m_format; }; diff --git a/include/logger/syslogwriter.h b/include/logger/syslogwriter.h index 0ef01b3..c9b50d2 100644 --- a/include/logger/syslogwriter.h +++ b/include/logger/syslogwriter.h @@ -23,18 +23,16 @@ #ifndef __FDL_SyslogWriter_H #define __FDL_SyslogWriter_H -#include "logger/logwriter.h" +#include -namespace boost { - class mutex; -} +#include namespace fdl { class SyslogWriter : public LogWriter { private: - static boost::mutex m_syslogOutMutex; + static std::mutex m_syslogOutMutex; public: SyslogWriter(); diff --git a/include/render/camera.h b/include/render/camera.h index 4bc33f0..102fc25 100644 --- a/include/render/camera.h +++ b/include/render/camera.h @@ -20,9 +20,7 @@ #include #include #else -#include -#include -#include +#include #endif namespace fdl { @@ -43,7 +41,7 @@ class Camera { * @param camName */ Camera( const cg::vecmath::Vector3f& eye, const cg::vecmath::Vector3f& target, - const cg::vecmath::Vector3f& up, float yFov, float near, float far); + const cg::vecmath::Vector3f& up, float yFov, float nearPlane, float farPlane); ~Camera(); diff --git a/include/render/glutapp.h b/include/render/glutapp.h index fd18ab5..ef41713 100644 --- a/include/render/glutapp.h +++ b/include/render/glutapp.h @@ -17,23 +17,22 @@ #include "cg/vecmath/vec2.hpp" #include "cg/vecmath/vec3.hpp" -#include "render/camera.h" +#include #ifdef __APPLE__ #include #include #include #else -#include -#include -#include +#include +#include #endif #ifndef _WIN32 #include #else #include -#include +#include int gettimeofday (struct timeval *tv, void* tz) { diff --git a/src/core/main.cpp b/src/App/main.cpp similarity index 83% rename from src/core/main.cpp rename to src/App/main.cpp index 918bbb6..6d08eb9 100644 --- a/src/core/main.cpp +++ b/src/App/main.cpp @@ -27,9 +27,7 @@ */ #include -#include -#include -#include + namespace po = boost::program_options; #include @@ -42,18 +40,10 @@ namespace po = boost::program_options; #include #include -#include "core/common.h" -#include "core/glutrender.h" -#include "core/fluidsolver.h" -#include "core/particle.hpp" -#include "core/particlesystem.h" -#include "core/grid.hpp" -#include "io/pngexporter.h" -#include "io/df3exporter.h" -#include "io/pbrtexporter.h" -#include "logger/logger.h" -#include "logger/stdiowriter.h" -#include "logger/syslogwriter.h" +#include +#include + +#include #ifndef TARGET_VERSION_MAJOR #define TARGET_VERSION_MAJOR 99 @@ -80,7 +70,6 @@ std::ostream& operator<<(std::ostream& os, const std::vector& v) */ int main(int argc, char **argv) { - fdl::Logger out; // figure out how to automate this output... std::cout << "FDL version " << TARGET_VERSION_MAJOR << "." << TARGET_VERSION_MINOR << " of " << __DATE__ << " at " << __TIME__ << std::endl; std::cout << "The source code to FDL is covered by the GNU GPL." << std::endl; @@ -90,12 +79,11 @@ int main(int argc, char **argv) fdl::StdOutWriter* stdlogger = new fdl::StdOutWriter(); stdlogger->setFormat("%H:%M:%S"); fdl::Logger::setIdentity("FDL"); - // fdl::Logger::RegisterWriter(syslogger); fdl::Logger::registerWriter(stdlogger); fdl::Logger::setLevel(fdl::Logger::WARN | fdl::Logger::ERROR); std::vector grid_dims(3, 50); // grid dimensions - double dx = 0.01; + float dx = 0.01f; double dt = 0.1; double cg_tol = pow( FLT_EPSILON, 0.5 ); std::string output_prefix = "density_export_"; @@ -182,24 +170,15 @@ int main(int argc, char **argv) catch(...) { ERROR() << "Exception of unknown type!"; } - - // fdl::GlutRender::init(argc, argv); - fdl::Grid* macGrid = new fdl::Grid(grid_dims[0], grid_dims[1], grid_dims[2], dx); - fdl::FluidSolver* fs = new fdl::FluidSolver(macGrid); - fs->setCGTolerance((float)cg_tol); - fs->setCGMaxIter(100); - fdl::PngExporter* pngOut = new fdl::PngExporter(output_prefix); - fdl::PbrtExporter* pbrtOut = new fdl::PbrtExporter(output_prefix); - // fdl::Df3Exporter* exporter = new fdl::Df3Exporter(); - - // fdl::ParticleSystem* ps = new fdl::ParticleSystem(); - // ps->init(macGrid); - while(1){ - fs->step(dt); - // ps->step(dt); - pngOut->start(*macGrid); - pbrtOut->start(*macGrid); - } + + fdl::Fdl &f = fdl::Fdl::Instance(); + f.setGridDimenctions(grid_dims[0], grid_dims[1], grid_dims[2], dx); + f.setCGTolerance((float)cg_tol); + f.setCGMaxIterations(50); + f.setStep((float)dt); + f.start(); + + system("pause"); return 0; } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 9091acf..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,164 +0,0 @@ -#================================================================================ -# Fluid Dynamics Engine CMake file -#================================================================================ - -cmake_minimum_required(VERSION 2.6) -set(CMAKE_BUILD_TYPE Debug) -if("${CMAKE_BUILD_TYPE}" EQUAL "Debug") - set(CMAKE_VERBOSE_MAKEFILE TRUE) # this does not even work... -endif() - -set(BOOST_LIBS thread date_time system program_options) -find_package(Boost COMPONENTS ${BOOST_LIBS} REQUIRED) - -# find_package(GSL REQUIRED) -find_package(PNG REQUIRED) -find_package(ZLIB REQUIRED) -find_package(GLUT REQUIRED) -find_package(OpenGL REQUIRED) - -if(APPLE AND UNIX) - set(LIB_PATH "/usr/local/lib") - set(INC_PATH "/usr/local/include") -elseif(UNIX AND NOT APPLE) - set(LIB_PATH "/usr/local/lib") - set(INC_PATH "/usr/local/include") -elseif(WIN32) - set(LIB_PATH "C:/msys/1.0/local/lib") - set(INC_PATH "C:/msys/1.0/local/include") -endif(APPLE AND UNIX) - -#-------------------------------------------------------------------------------- -# This is the list of source files that need to be compiled -#-------------------------------------------------------------------------------- -set( fdl_SRCS - core/main.cpp - core/fluidsolver.cpp - core/particlesystem.cpp - io/exporterbase.cpp - io/pngexporter.cpp - io/df3exporter.cpp - io/pbrtexporter.cpp - logger/logger.cpp - logger/logwriter.cpp - logger/stdiowriter.cpp - logger/syslogwriter.cpp - render/glutapp.cpp - render/camera.cpp -) - -#-------------------------------------------------------------------------------- -# Another list, this time it includes all header files that should be treated with moc -#-------------------------------------------------------------------------------- -set( fdl_MOC_HDRS - # application.h -) - -#-------------------------------------------------------------------------------- -# .ui files that are used in the project (none) -#-------------------------------------------------------------------------------- -set( fdl_UIS - # none yet. -) - -#-------------------------------------------------------------------------------- -# and finally any resource files (none) -#-------------------------------------------------------------------------------- -set( fdl_RCS - # none yet. -) - -#-------------------------------------------------------------------------------- -# This sets the windows build that will need the special winmain@16 call. Qt provides -# this for us in the qtmain.lib file. Using this cmake code will ensure we have it -# linked into our build. Not needed on Unix/OS X/Linux which is why we have the -# IF(WIN32) conditional. -if (WIN32) - set (QT_USE_QTMAIN TRUE) -endif (WIN32) - -#-------------------------------------------------------------------------------- -# This command finds Qt4 libraries and sets all required variables -# find_package( Qt4 REQUIRED ) - -#-------------------------------------------------------------------------------- -# QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a path to -# a CMake script that sets up this directory for building with Qt4 -# include( ${QT_USE_FILE} ) - -#-------------------------------------------------------------------------------- -# This command will generate rules that will run rcc on all files from fdl_RCS -# in result fdl_GEN_RCS variable will contain paths to files produced by rcc -# qt4_add_resources( fdl_GEN_RCS ${fdl_RCS} ) - -#-------------------------------------------------------------------------------- -# This will run uic on .ui files: -# qt4_wrap_ui( fdl_GEN_UIS ${fdl_UIS} ) - -#-------------------------------------------------------------------------------- -# And finally this will run moc on the headers -# qt4_wrap_cpp( fdl_GEN_MOC_HDRS ${fdl_MOC_HDRS} ) - - -#-------------------------------------------------------------------------------- -# Use whatever QT executables were used for building VTK (not totally necessary) -# set(QT_QMAKE_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") -# set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") -# set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") -# set(DESIRED_QT_VERSION ${VTK_DESIRED_QT_VERSION} CACHE FILEPATH "") - - - -#-------------------------------------------------------------------------------- -# We need this to be able to include headers produced by uic in our code -# CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() -# works just like INCLUDEPATH from qmake -include_directories ( - # Look in the cmake build directory (some generated headers could be there) - ${INC_PATH} - ${ZLIB_INCLUDE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${PNG_INCLUDE_DIR} - ${Boost_INCLUDE_DIRS} - ${PROJECT_SOURCE_DIR}/extern - ${PROJECT_SOURCE_DIR}/include -) - -#-------------------------------------------------------------------------------- -# For Apple set the icns file containing icons -if(APPLE) - # set how it shows up in the Info.plist file - # set(MACOSX_BUNDLE_ICON_FILE fdl.icns) - # set where in the bundle to put the icns file - # set_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/fdl.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - # include the icns file in the target - # set(fdl_SRCS ${fdl_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/fdl.icns) -endif(APPLE) - -#-------------------------------------------------------------------------------- -# CMake's way of creating an executable -# set( EXECUTABLE_OUTPUT_PATH ../bin ) - -# how can I setup an automated versioning that can be reflected in source code? -set( TARGET_VERSION_MAJOR 0 ) -set( TARGET_VERSION_MINOR 2 ) -add_definitions( -DCMAKE_TARGET_VERSION=1 -DTARGET_VERSION_MAJOR=${TARGET_VERSION_MAJOR} -DTARGET_VERSION_MINOR=${TARGET_VERSION_MINOR}) - -# ADD_EXECUTABLE( fdl MACOSX_BUNDLE WIN32 -add_executable( fdl - ${fdl_SRCS} - ${fdl_GEN_MOC_HDRS} - ${fdl_GEN_UIS} - ${fdl_GEN_RCS} -) - - -#-------------------------------------------------------------------------------- -# Tell CMake which libraries we need to link our executable against. -target_link_libraries ( fdl - ${Boost_LIBRARIES} - ${PNG_LIBRARY} - ${ZLIB_LIBRARIES} - ${GLUT_LIBRARY} - ${OPENGL_LIBRARY} -) \ No newline at end of file diff --git a/src/core/Fdl.cpp b/src/core/Fdl.cpp new file mode 100644 index 0000000..955ffbe --- /dev/null +++ b/src/core/Fdl.cpp @@ -0,0 +1,111 @@ +#include +#include +#include + +#include + +#include + +namespace fdl { + +Fdl &Fdl::Instance() +{ + static Fdl inst; + return inst; +} + +Fdl::Fdl() + :m_macGrid(NULL), m_fluidSolver(NULL), m_step(0.1f), + m_cgMaxIterations(100), m_stop(false), m_isRunning(false) +{ + m_cgTolerance = (float)pow(FLT_EPSILON, 0.5); + m_gridDimensions[0] = 50; + m_gridDimensions[1] = 50; + m_gridDimensions[2] = 50; +} + +Fdl::~Fdl() +{ + delete m_fluidSolver; + delete m_macGrid; +} + +void Fdl::setGridDimenctions(unsigned x, unsigned y, unsigned z, float dx) +{ + m_gridDimensions[0] = x; + m_gridDimensions[1] = y; + m_gridDimensions[2] = z; + m_dx = dx; +} + +void Fdl::setCGTolerance(float tol) +{ + m_cgTolerance = tol; +} + +void Fdl::setCGMaxIterations(unsigned it) +{ + m_cgMaxIterations = it; +} + +void Fdl::setStep(float step) +{ + m_step = step; +} + +void Fdl::startAsync() +{ + if (m_isRunning) return; + + m_macGrid = new fdl::Grid(m_gridDimensions[0], m_gridDimensions[1], m_gridDimensions[2], m_dx); + m_fluidSolver = new fdl::FluidSolver(m_macGrid); + m_fluidSolver->setCGTolerance(m_cgTolerance); + m_fluidSolver->setCGMaxIter(m_cgMaxIterations); + + m_isRunning = true; + m_runnerThread = std::thread(&Fdl::solverFunc, this); +} + +void Fdl::start() +{ + if (m_isRunning) return; + + m_macGrid = new fdl::Grid(m_gridDimensions[0], m_gridDimensions[1], m_gridDimensions[2], m_dx); + m_fluidSolver = new fdl::FluidSolver(m_macGrid); + m_fluidSolver->setCGTolerance(m_cgTolerance); + m_fluidSolver->setCGMaxIter(m_cgMaxIterations); + + m_isRunning = true; + solverFunc(); +} + +void Fdl::stop() +{ + if (!m_isRunning) return; + + m_stop = true; + m_runnerThread.join(); +} + +void Fdl::solverFunc() +{ + omp_set_num_threads(omp_get_num_procs()); + + PngExporter* pngOut = new fdl::PngExporter("density_export_"); + unsigned totalIter = 0; + + std::chrono::system_clock::time_point startTime = std::chrono::system_clock::now(); + + while (!m_stop && totalIter < m_cgMaxIterations) + { + m_fluidSolver->step(m_step); + pngOut->start(*m_macGrid); + ++totalIter; + } + + std::chrono::system_clock::time_point endTime = std::chrono::system_clock::now(); + + std::cout << "Finished in " << std::chrono::duration_cast(endTime - startTime).count() << std::endl; +} + +} // namespace fdl \ No newline at end of file diff --git a/src/core/fluidsolver.cpp b/src/core/fluidsolver.cpp index 58862dd..37be1a4 100644 --- a/src/core/fluidsolver.cpp +++ b/src/core/fluidsolver.cpp @@ -6,11 +6,13 @@ #include #include +#include + #include -#include "core/common.h" -#include "core/fluidsolver.h" -#include "logger/logger.h" +#include +#include +#include namespace fdl { @@ -99,8 +101,8 @@ float FluidSolver::computeMaxTimeStep() const float maxVelocity = grid->getMaximumVelocity(); if (maxVelocity < 0.2) maxVelocity = 0.2f; - maxVelocity += m_gravity.getSquareRoot().length(); - return (5.0*m_dx) / maxVelocity; + maxVelocity += (float)m_gravity.getSquareRoot().length(); + return (5.0f*m_dx) / maxVelocity; } @@ -158,6 +160,7 @@ void FluidSolver::step(float dt) // apply forces to velocity field INFO() << " + Adding forces .."; +#pragma omp parallel for shared(dt) schedule(dynamic, 1) for (int z=0; zclearForces(); // Calculate the magnitude of the curl +#pragma omp parallel for shared(dt) schedule(dynamic, 1) for (int z=0; zswapDensities(); // Advect the velocity field +#pragma omp parallel for shared(dt) schedule(dynamic, 1) for (int z=0; z #include -#include "core/grid.hpp" -#include "core/vector.hpp" -#include "core/particle.hpp" -#include "core/particlesystem.h" +#include +#include +#include +#include namespace fdl { diff --git a/src/io/df3exporter.cpp b/src/io/df3exporter.cpp index 13589b5..c45c811 100644 --- a/src/io/df3exporter.cpp +++ b/src/io/df3exporter.cpp @@ -1,8 +1,8 @@ #include #include -#include "io/df3exporter.h" -#include "logger/logger.h" +#include +#include namespace fdl { @@ -39,7 +39,8 @@ void Df3Exporter::write() int sizeY = m_grid->getGridSizeY(); int sizeZ = m_grid->getGridSizeZ(); - float* density = m_grid->getDensityArray(); + std::vector density; + m_grid->getDensityArray(density); exportDensity(m_filenameCounter, m_filenamePrefix, density, sizeX, sizeY, sizeZ); m_filenameCounter++; @@ -63,7 +64,7 @@ void Df3Exporter::write() * @param zRes resolution of the grid in the z dimension * */ -void Df3Exporter::exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes) +void Df3Exporter::exportDensity(int counter, std::string prefix, const std::vector &field, int xRes, int yRes, int zRes) { char buffer[256]; sprintf(buffer,"%04i", counter); diff --git a/src/io/exporterbase.cpp b/src/io/exporterbase.cpp index b8dfe1c..cf1a9c1 100644 --- a/src/io/exporterbase.cpp +++ b/src/io/exporterbase.cpp @@ -1,7 +1,7 @@ -#include +#include -#include "logger/logger.h" -#include "io/exporterbase.h" +#include +#include namespace fdl { @@ -39,11 +39,13 @@ long int ExporterBase::start(fdl::Grid& grid) m_writeMutex.lock(); m_grid = grid.copy(); - - boost::thread t1(boost::bind(&ExporterBase::write,this)); + + std::thread t1(&ExporterBase::write,this); t1.join(); m_writeMutex.unlock(); + + return 0; } /** diff --git a/src/io/pbrtexporter.cpp b/src/io/pbrtexporter.cpp index 2bda950..905a99c 100644 --- a/src/io/pbrtexporter.cpp +++ b/src/io/pbrtexporter.cpp @@ -1,6 +1,7 @@ #include -#include "io/pbrtexporter.h" -#include "logger/logger.h" +#include +#include +#include namespace fdl { @@ -40,7 +41,8 @@ void PbrtExporter::write() int sizeY = m_grid->getGridSizeY(); int sizeZ = m_grid->getGridSizeZ(); - float* density = m_grid->getDensityArray(); + std::vector density; + m_grid->getDensityArray(density); exportDensity(m_filenameCounter, m_filenamePrefix, density, sizeX, sizeY, sizeZ); m_filenameCounter++; @@ -63,7 +65,7 @@ void PbrtExporter::write() * @param zRes resolution of the grid in the z dimension * */ -void PbrtExporter::exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes) +void PbrtExporter::exportDensity(int counter, std::string prefix, std::vector &field, int xRes, int yRes, int zRes) { char buffer[256]; sprintf(buffer,"%04i", counter); @@ -114,14 +116,12 @@ void PbrtExporter::exportDensity(int counter, std::string prefix, float* field, if(m_isCancelled){ gzclose(file); - delete[] field; return; } } gzprintf(file, "] \n \n"); gzclose(file); - delete[] field; } } // namespace fdl \ No newline at end of file diff --git a/src/io/pngexporter.cpp b/src/io/pngexporter.cpp index 0be8950..21edeac 100644 --- a/src/io/pngexporter.cpp +++ b/src/io/pngexporter.cpp @@ -1,7 +1,7 @@ #include -#include "io/pngexporter.h" -#include "logger/logger.h" +#include +#include namespace fdl { @@ -38,7 +38,8 @@ void PngExporter::write() int sizeX = m_grid->getGridSizeX(); int sizeY = m_grid->getGridSizeY(); int sizeZ = m_grid->getGridSizeZ(); - float* density = m_grid->getDensityArray(); + std::vector density; + m_grid->getDensityArray(density); exportDensity(m_filenameCounter, m_filenamePrefix, density, sizeX, sizeY, sizeZ); m_filenameCounter++; @@ -57,15 +58,15 @@ void PngExporter::write() * @param zRes resolution of the grid in the z dimension * */ -void PngExporter::exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes) +void PngExporter::exportDensity(int counter, std::string prefix, const std::vector &field, int xRes, int yRes, int zRes) { char buffer[256]; sprintf(buffer,"%04i", counter); std::string number = std::string(buffer); int totalSize = xRes * yRes * zRes; - unsigned char pngbuf[xRes*yRes*4]; - unsigned char* rows[yRes]; + unsigned char *pngbuf = (unsigned char *)malloc(xRes * yRes * 4 * sizeof(unsigned char)); + unsigned char **rows = (unsigned char **)malloc(yRes * sizeof(unsigned char *)); for (int j=0; j -#include "io/sceneimporter.h" +#include + +#include +#include /* // Example scene file... @@ -20,63 +23,67 @@ */ -SceneImporter::SceneImporter() {} - -SceneImporter::~SceneImporter() {} - -bool SceneImporter::load(const std::string& filename) -{ - read_xml(filename, pt); - - // Get filename and store it in m_file variable. Note that - // we specify a path to the value using notation where keys - // are separated with dots (different separator may be used - // if keys themselves contain dots). If debug.filename key is - // not found, exception is thrown. - m_file = pt.get("debug.filename"); - - - // Get debug level and store it in m_level variable. This is - // another version of get method: if debug.level key is not - // found, it will return default value (specified by second - // parameter) instead of throwing. Type of the value extracted - // is determined by type of second parameter, so we can simply - // write get(...) instead of get(...). - m_level = pt.get("scene.log-level", 0); - - // Iterate over debug.modules section and store all found - // modules in m_modules set. get_child() function returns a - // reference to child at specified path; if there is no such - // child, it throws. Property tree iterator can be used in - // the same way as standard container iterator. Category - // is bidirectional_iterator. - //BOOST_FOREACH(ptree::value_type &v, pt.get_child("debug.modules")) - // m_modules.insert(v.second.data()); - - return true; - -} - -bool SceneImporter::save(const std::string& filename) -{ - // Put log filename in property tree - pt.put("debug.filename", m_file); - - // Put debug level in property tree - pt.put("debug.level", m_level); - - // Iterate over modules in set and put them in property - // tree. Note that put function places new key at the - // end of list of keys. This is fine in most of the - // situations. If you want to place item at some other - // place (i.e. at front or somewhere in the middle), - // this can be achieved using combination of insert - // and put_value functions - //BOOST_FOREACH(const std::string &name, m_modules) - // pt.put("debug.modules.module", name, true); - - // Write property tree to XML file - write_xml(filename, pt); - - return true; -} \ No newline at end of file +namespace fdl { + + SceneImporter::SceneImporter() {} + + SceneImporter::~SceneImporter() {} + + bool SceneImporter::load(const std::string& filename) + { + read_xml(filename, pt); + + // Get filename and store it in m_file variable. Note that + // we specify a path to the value using notation where keys + // are separated with dots (different separator may be used + // if keys themselves contain dots). If debug.filename key is + // not found, exception is thrown. + m_file = pt.get("debug.filename"); + + + // Get debug level and store it in m_level variable. This is + // another version of get method: if debug.level key is not + // found, it will return default value (specified by second + // parameter) instead of throwing. Type of the value extracted + // is determined by type of second parameter, so we can simply + // write get(...) instead of get(...). + m_level = pt.get("scene.log-level", 0); + + // Iterate over debug.modules section and store all found + // modules in m_modules set. get_child() function returns a + // reference to child at specified path; if there is no such + // child, it throws. Property tree iterator can be used in + // the same way as standard container iterator. Category + // is bidirectional_iterator. + //BOOST_FOREACH(ptree::value_type &v, pt.get_child("debug.modules")) + // m_modules.insert(v.second.data()); + + return true; + + } + + bool SceneImporter::save(const std::string& filename) + { + // Put log filename in property tree + pt.put("debug.filename", m_file); + + // Put debug level in property tree + pt.put("debug.level", m_level); + + // Iterate over modules in set and put them in property + // tree. Note that put function places new key at the + // end of list of keys. This is fine in most of the + // situations. If you want to place item at some other + // place (i.e. at front or somewhere in the middle), + // this can be achieved using combination of insert + // and put_value functions + //BOOST_FOREACH(const std::string &name, m_modules) + // pt.put("debug.modules.module", name, true); + + // Write property tree to XML file + write_xml(filename, pt); + + return true; + } + +} // namespace fdl \ No newline at end of file diff --git a/src/logger/logger.cpp b/src/logger/logger.cpp index fee71a4..5bd257a 100644 --- a/src/logger/logger.cpp +++ b/src/logger/logger.cpp @@ -8,14 +8,12 @@ */ -#include "logger/logger.h" -#include "logger/logwriter.h" +#include +#include -#include -#include -#include #include -#include +#include +#include namespace fdl { @@ -237,13 +235,12 @@ void Logger::writeMessage() { * */ std::string Logger::currentTime(const char* format) { - - std::ostringstream dateTime; - const boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); - boost::posix_time::time_facet* const f = new boost::posix_time::time_facet(format); - dateTime.imbue(std::locale(dateTime.getloc(),f)); - dateTime << now; - return dateTime.str(); + std::chrono::time_point timeNow = std::chrono::system_clock::now(); + std::time_t time = std::chrono::system_clock::to_time_t(timeNow); + std::tm *tmTime = std::localtime(&time); + char strTime[100]; + std::strftime(strTime, 100, format, tmTime); + return std::string(strTime); } diff --git a/src/logger/logwriter.cpp b/src/logger/logwriter.cpp index 567973c..2311c14 100644 --- a/src/logger/logwriter.cpp +++ b/src/logger/logwriter.cpp @@ -7,7 +7,7 @@ * */ -#include "logger/logwriter.h" +#include namespace fdl { diff --git a/src/logger/stdiowriter.cpp b/src/logger/stdiowriter.cpp index bf6e9c9..c7cb7e2 100644 --- a/src/logger/stdiowriter.cpp +++ b/src/logger/stdiowriter.cpp @@ -7,15 +7,15 @@ * */ -#include "logger/stdiowriter.h" +#include #include -#include +#include namespace fdl { -boost::mutex StdOutWriter::m_coutMutex; +std::mutex StdOutWriter::m_coutMutex; /** * Constructor. Initializes the format property. @@ -57,7 +57,7 @@ void StdOutWriter::setFormat(const char* newFormat) */ void StdOutWriter::write( Logger::LEVEL level, const std::string& identity, const std::string& message ) { - boost::mutex::scoped_lock lock(m_coutMutex); + std::lock_guard guard(m_coutMutex); std::cout << "[" << Logger::currentTime(m_format) << " " << Logger::loggerLevelAsString( level ) << "] " << message << std::endl; } diff --git a/src/logger/syslogwriter.cpp b/src/logger/syslogwriter.cpp index d5e70fa..c90a623 100644 --- a/src/logger/syslogwriter.cpp +++ b/src/logger/syslogwriter.cpp @@ -7,16 +7,17 @@ * */ -#include "logger/syslogwriter.h" +#include -#include +#ifndef _WIN32 #include +#endif #include namespace fdl { -boost::mutex SyslogWriter::m_syslogOutMutex; +std::mutex SyslogWriter::m_syslogOutMutex; /** * constructor, initializes superclass LogWriter with "Syslog Writer" @@ -44,14 +45,16 @@ SyslogWriter::~SyslogWriter( ) { */ void SyslogWriter::write( Logger::LEVEL level, const std::string& identity, const std::string& message ) { - boost::mutex::scoped_lock lock( m_syslogOutMutex ); + std::lock_guard lock( m_syslogOutMutex ); std::ostringstream m; m << "[" << Logger::loggerLevelAsString( level ) << "] " << message; +#ifndef _WIN32 openlog( identity.c_str(), LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL5 ); setlogmask( LOG_UPTO( LOG_NOTICE ) ); syslog(mapLevel( level ), "%s", m.str().c_str() ); +#endif } @@ -67,15 +70,15 @@ int SyslogWriter::mapLevel( const Logger::LEVEL& level ) { switch ( level ) { case Logger::ERROR: - return LOG_ERR; + return Logger::ERROR; case Logger::WARN: - return LOG_WARNING; + return Logger::WARN; case Logger::INFO: case Logger::DEV: case Logger::DEBUG: - return LOG_NOTICE; + return Logger::INFO; } - return LOG_DEBUG; + return Logger::DEBUG; } } // namespace fdl \ No newline at end of file diff --git a/src/render/camera.cpp b/src/render/camera.cpp index f051453..acb7892 100644 --- a/src/render/camera.cpp +++ b/src/render/camera.cpp @@ -6,23 +6,21 @@ #include #include -#include "cg/vecmath/vec2.hpp" -#include "cg/vecmath/vec3.hpp" -#include "cg/vecmath/vec4.hpp" -#include "cg/vecmath/mat4.hpp" -#include "cg/vecmath/mat3.hpp" +#include +#include +#include +#include +#include #ifdef __APPLE__ #include #include #include #else -#include -#include -#include +#include #endif -#include "render/camera.h" +#include namespace fdl { @@ -59,14 +57,14 @@ Camera::Camera() Camera::Camera( const Vector3f& eye, const Vector3f& target, const Vector3f& up, - float yFov, float near, float far) + float yFov, float nearPlane, float farPlane) { m_eye = eye; m_target = target; m_up = up; m_fov = yFov; - m_near = near; - m_far = far; + m_near = nearPlane; + m_far = farPlane; } /** diff --git a/src/render/glutapp.cpp b/src/render/glutapp.cpp index ab1564e..377e13a 100644 --- a/src/render/glutapp.cpp +++ b/src/render/glutapp.cpp @@ -9,7 +9,7 @@ #include #include -#include "render/glutapp.h" +#include namespace fdl { @@ -88,6 +88,8 @@ int GlutApp::render() // swap drawing buffers glutSwapBuffers(); + + return 0; } void GlutApp::windowToViewport(cg::vecmath::Point2f& p) const @@ -123,6 +125,8 @@ int GlutApp::resize(int width, int height) //glOrtho(0, self->m_width, self->m_height, 0, -1.0f, 1.0f); // glMatrixMode(GL_MODELVIEW); m_camera->setAspect(width / height); + + return 0; } int GlutApp::keyPressed(unsigned char key) @@ -134,10 +138,13 @@ int GlutApp::keyPressed(unsigned char key) }else{ std::cout << "key pressed: " << key << std::endl; } + + return 0; } int GlutApp::keyReleased(unsigned char key) { + return 0; } int GlutApp::mousePressed(int button, int x, int y) @@ -146,12 +153,16 @@ int GlutApp::mousePressed(int button, int x, int y) lastMousePt->set(x, y); windowToViewport(*lastMousePt); m_button1Down = true; + + return 0; } int GlutApp::mouseReleased(int button, int x, int y) { // std::cout << "mouse released: " << x << ", " << y << std::endl; m_button1Down = false; + + return 0; } int GlutApp::mouseMoved(int x, int y) @@ -161,6 +172,8 @@ int GlutApp::mouseMoved(int x, int y) windowToViewport(*currMousePt); m_camera->orbit(*lastMousePt, *currMousePt); *lastMousePt = *currMousePt; + + return 0; } /** diff --git a/workspaces/Windows/FDL.sln b/workspaces/Windows/FDL.sln new file mode 100644 index 0000000..35762ed --- /dev/null +++ b/workspaces/Windows/FDL.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FDL", "FDL.vcxproj", "{342EC11E-54CE-4BEE-90EF-478B53993F1C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FDLApp", "FDLApp.vcxproj", "{2290FA84-23DF-4328-960B-E262A40CCC6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Debug|x64.ActiveCfg = Debug|x64 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Debug|x64.Build.0 = Debug|x64 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Debug|x86.ActiveCfg = Debug|Win32 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Debug|x86.Build.0 = Debug|Win32 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Release|x64.ActiveCfg = Release|x64 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Release|x64.Build.0 = Release|x64 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Release|x86.ActiveCfg = Release|Win32 + {342EC11E-54CE-4BEE-90EF-478B53993F1C}.Release|x86.Build.0 = Release|Win32 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Debug|x64.ActiveCfg = Debug|x64 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Debug|x64.Build.0 = Debug|x64 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Debug|x86.ActiveCfg = Debug|Win32 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Debug|x86.Build.0 = Debug|Win32 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Release|x64.ActiveCfg = Release|x64 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Release|x64.Build.0 = Release|x64 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Release|x86.ActiveCfg = Release|Win32 + {2290FA84-23DF-4328-960B-E262A40CCC6A}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/workspaces/Windows/FDL.vcxproj b/workspaces/Windows/FDL.vcxproj new file mode 100644 index 0000000..eb5b2f4 --- /dev/null +++ b/workspaces/Windows/FDL.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {342EC11E-54CE-4BEE-90EF-478B53993F1C} + FDL + 8.1 + + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + StaticLibrary + true + v140 + MultiByte + + + StaticLibrary + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + + + + + Level3 + Disabled + true + ..\..\include;..\..\extern;..\..\..\boost_1_61_0;..\..\..\libPNG;..\..\..\zlib-1.2.8;%(AdditionalIncludeDirectories) + _USE_MATH_DEFINES;_WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + ..\..\..\boost_1_61_0\stage\lib;..\..\..\libPNG\x64\Debug;..\..\..\zlib-1.2.8\x64\Debug;%(AdditionalLibraryDirectories) + libboost_system-vc140-mt-gd-1_61.lib;libboost_program_options-vc140-mt-gd-1_61.lib;libpng16_staticd.lib;zlibstaticd.lib;%(AdditionalDependencies) + + + ..\..\..\libPNG\x64\Debug;..\..\..\zlib-1.2.8\x64\Debug;%(AdditionalLibraryDirectories) + libpng16_staticd.lib;zlibstaticd.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + ..\..\include;..\..\extern;..\..\..\boost_1_61_0;..\..\..\libPNG;..\..\..\zlib-1.2.8;%(AdditionalIncludeDirectories) + _USE_MATH_DEFINES;_WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;-DBOOST_UBLAS_NDEBUG;-DNDEBUG;%(PreprocessorDefinitions) + true + + + true + true + + + ..\..\..\libPNG\x64\Release;..\..\..\zlib-1.2.8\x64\Release;%(AdditionalLibraryDirectories) + libpng16_static.lib;zlibstatic.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/workspaces/Windows/FDL.vcxproj.filters b/workspaces/Windows/FDL.vcxproj.filters new file mode 100644 index 0000000..519f693 --- /dev/null +++ b/workspaces/Windows/FDL.vcxproj.filters @@ -0,0 +1,150 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {d7e89123-49d8-46af-927d-8a81b1533bb8} + + + {c74d36a2-d2b3-4341-b293-e68584559872} + + + {6cf0f4b8-e468-4f2c-9e1d-701f2a147a52} + + + {d3afab80-d0f5-4f86-ab85-90e332de1db2} + + + {911a0fc7-7b5a-4d58-a60d-4ff4cd4adcdc} + + + {24c1937e-9b6b-4be0-8179-e681ad0dcaf0} + + + {a54a47b0-6de9-48c1-a7b4-e20bb560babf} + + + {cbeee94d-0cd3-469a-8744-7185ac2d718e} + + + + + Header Files\core + + + Header Files\core + + + Header Files\core + + + Header Files\core + + + Header Files\core + + + Header Files\core + + + Header Files\core + + + Header Files\io + + + Header Files\io + + + Header Files\io + + + Header Files\io + + + Header Files\io + + + Header Files\io + + + Header Files\logger + + + Header Files\logger + + + Header Files\logger + + + Header Files\logger + + + Header Files\render + + + Header Files\render + + + Header Files\core + + + + + Source Files\core + + + Source Files\core + + + Source Files\io + + + Source Files\io + + + Source Files\io + + + Source Files\io + + + Source Files\io + + + Source Files\logger + + + Source Files\logger + + + Source Files\logger + + + Source Files\logger + + + Source Files\render + + + Source Files\render + + + Source Files\core + + + + + + \ No newline at end of file diff --git a/workspaces/Windows/FDLApp.vcxproj b/workspaces/Windows/FDLApp.vcxproj new file mode 100644 index 0000000..598c414 --- /dev/null +++ b/workspaces/Windows/FDLApp.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {2290FA84-23DF-4328-960B-E262A40CCC6A} + FDLApp + 8.1 + + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + + + + + Level3 + Disabled + true + ..\..\include;..\..\..\boost_1_61_0 + _USE_MATH_DEFINES;%(PreprocessorDefinitions) + + + ..\..\..\boost_1_61_0\stage\lib;x64\Debug;%(AdditionalLibraryDirectories) + libboost_program_options-vc140-mt-gd-1_61.lib;FDL.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + ..\..\include;..\..\..\boost_1_61_0 + _USE_MATH_DEFINES;%(PreprocessorDefinitions) + + + true + true + ..\..\..\boost_1_61_0\stage\lib;x64\Release;%(AdditionalLibraryDirectories) + libboost_program_options-vc140-mt-1_61.lib;FDL.lib;%(AdditionalDependencies) + + + + + + + + + \ No newline at end of file diff --git a/workspaces/Windows/FDLApp.vcxproj.filters b/workspaces/Windows/FDLApp.vcxproj.filters new file mode 100644 index 0000000..3478106 --- /dev/null +++ b/workspaces/Windows/FDLApp.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/workspaces/Windows/packages.config b/workspaces/Windows/packages.config new file mode 100644 index 0000000..5b03888 --- /dev/null +++ b/workspaces/Windows/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file